  
var ie = (document.all)?1:0;
var cancelHide2 = false;

function getElementsByClassName(oElm, strTagName, oClassNames){
	/*
	USAGE: getElementsByClassName(element_where_to_search,tag,class)
	*/
    var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
    var arrReturnElements = new Array();
    var arrRegExpClassNames = new Array();
    if(typeof oClassNames == "object"){
        for(var i=0; i<oClassNames.length; i++){
            arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)"));
        }
    }
    else{
        arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));
    }
    var oElement;
    var bMatchesAll;
    for(var j=0; j<arrElements.length; j++){
        oElement = arrElements[j];
        bMatchesAll = true;
        for(var k=0; k<arrRegExpClassNames.length; k++){
            if(!arrRegExpClassNames[k].test(oElement.className)){
                bMatchesAll = false;
                break;                      
            }
        }
        if(bMatchesAll){
            arrReturnElements.push(oElement);
        }
    }
    return (arrReturnElements)
}

function $() {
	var elements = new Array();
	for (var i = 0; i < arguments.length; i++) {
		var element = arguments[i];
		if (typeof element == 'string')
			element = document.getElementById(element);
		if (arguments.length == 1)
			return element;
		elements.push(element);
	}
	return elements;
}



function isEmail(m) {
	var email_regex = /^[\w\d\!\#\$\.\%\&\'\*\+\-\/\=\?\^\_\`\{\|\}\~]+(\.[\w\d\!\#\$\%\&\'\*\+\-\/\=\?\^\_\`\{\|\}\~])*\@(((\w+[\w\d\-]*[\w\d]\.)+(\w+[\w\d\-]*[\w\d]))|((\d{1,3}\.){3}\d{1,3}))$/;
	/*'*/
	return (email_regex.test(m));
}

function hover(obj){
	obj.style.backgroundColor="skyblue";
	obj.style.cursor="pointer";
}

function dehover(obj,color){
	obj.style.backgroundColor=color;
}


function newElement(data) {
    var el;
    if ('string'==typeof data) {
        el=document.createTextNode(data);
    } else {
        //create the element
        el=document.createElement(data.tag);
        delete(data.tag);

        //append the children
        if ('undefined'!=typeof data.children) {
            if ('string'==typeof data.children ||
                'undefined'==typeof data.children.length
            ) {
                //strings and single elements
                el.appendChild(newElement(data.children));
            } else {
                //arrays of elements
                for (var i=0, child=null; 'undefined'!=typeof (child=data.children[i]); i++) {
                    el.appendChild(newElement(child));
                }
            }
            delete(data.children);
        }

        //any other data is attributes
        for (attr in data) {
            el[attr]=data[attr];
        }
    }

    return el;
}


function print_r(obj,aler) {
	if(!aler) aler=false;
	try {
		var debugWindow = {};
		if(typeof obj == "object" || typeof obj == "array") {
			var result = ""
			var name = (obj.name || obj.id);
			for (var i in obj)
				result += name+"." + i + " = " + obj[i] + "; "
			if(aler) {
				alert(result)
			} else {
				if(debugWindow) {
					debugWindow.innerText = debugWindow.innerText +"\n\n--------------------------------------------------\n\n"+ result
				} else {
					debugWindow = newElement({
						tag:"div",
						innerText:result
					})
					document.body.appendChild(debugWindow);
				}
			}
		} else {
			alert("you can't show element properties typeof "+typeof obj)
		}
	} catch(e){throw(e)}
}

function isset(e) {
	if(typeof e =="undefined") return false;
	else return typeof e;
}

function redirect(url){
	if(!url) return;
	document.location.href = url;
}

function checkLoginForm() {
	if($("username").value=="") {
		tip.show($("username"),"left","Enter your username","error");
		$("username").focus();
		return false;
	} else if($("password").value=="") {
		tip.show($("password"),"left","Plase enter the password","error");
		$("password").focus();
		return false;
	}
}

function confirmDelete() {
	if(confirm("Are you sure you want to delete this record?")) {
		return true;
	} else {
		return false;
	}
}

function confirmDeleteFile() {
	if(confirm("Are you sure you want to delete this file?")) {
		return true;
	} else {
		return false;
	}
}

function copy(inElement) {
	if (inElement.createTextRange) {
		var range = inElement.createTextRange();
		if (range && BodyLoaded==1)
			range.execCommand('Copy');
	} else {
		var flashcopier = 'flashcopier';
		if(!document.getElementById(flashcopier)) {
			var divholder = document.createElement('div');
			divholder.id = flashcopier;
			document.body.appendChild(divholder);
		}
		document.getElementById(flashcopier).innerHTML = '';
		var divinfo = '<embed src="'+FOLDERS.js+'/modules/clipboard.swf" FlashVars="clipboard='+encodeURIComponent(inElement.value)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
		document.getElementById(flashcopier).innerHTML = divinfo;
	}
}

Array.prototype.in_array = function ( obj ) {
	var len = this.length;
	for ( var x = 0 ; x <= len ; x++ ) {
		if ( this[x] == obj ) return true;
	}
	return false;
}


function toggleMenu(e) {
	var ul = (typeof e.parentNode.childNodes[1]!="undefined")?e.parentNode.childNodes[1]:false;
	if(ul) ul.style.display = (ul.style.diplay!="" && ul.style.display=="block")?"none":"block";
}

function menu_Hide(e) {
	e.className=e.className.replace(new RegExp("activeMenu"), "");
	e.className=e.className.replace(new RegExp("activeMenu"), "");
	var ul = e.getElementsByTagName("UL");
	if(ul.length) ul[0].style.left = "-9999px";
}
function menu_Show(e) {
	found = false
	for(i in e.childNodes) {
		if(e.childNodes[i].tagName=="UL") {
			found = true;
		}
	}
	if(found) {
		var cordinates = menu_findPos(e)
		e.className = "activeMenu"+((e.className.indexOf("active")!=-1)?" activeTab":"")
		var ul = e.getElementsByTagName("UL");
		if(ul.length) {
			ul[0].style.left = cordinates[0]+"px";
			ul[0].style.top = "28px";
		}
	}
}
function menu_findPos(e) {
	var left=0;
	var top = 0;
	var element = e;
	while (element.offsetParent) {
		if(element.tagName=="UL") break;
		left += element.offsetLeft;
		top += element.offsetTop;
		element = element.offsetParent;
	}
	return ([left,top]);
}
function menu_Init() {
	var elements = document.getElementById("nav").getElementsByTagName("li");
	for(i in elements) {
		elements[i].onmouseover = function() { menu_Show(this) }
		elements[i].onmouseout = function() { menu_Hide(this) }
	}
}

function showUndeletables(){
	elements=document.getElementsByTagName('div');
	for(a=0;a<elements.length;a++){
		 if(elements[a].className=='undeletable'){
		 	elements[a].style.display="block";
		 }
	}
}

function showElement(obj){
	alert('td');
	acc.display(obj.id);
}
currentFont=12;
function makeBigger(){
	
	currentFont++;
	var par = $('fontEditableContent');
	par.style.fontSize=currentFont+"px";
	children = par.getChildren();
	
	enlargeChildren(children,"big");
	
	
}

function enlargeChildren(elements,action){
    var a = 0;
	if(elements.length==0) { return; }
	
	for(a=0;a<elements.length;a++){
		var fnt = elements[a].getStyle('fontSize');
		var val = parseInt(fnt.substring(0,fnt.length-2));
		var ext = fnt.substring(fnt.length-2);
		if(action=='big'){
			val+=2;
		}else{
			val-=2;
		}
		
		elements[a].style.fontSize=val+""+ext;
		child = elements[a].getChildren();
		enlargeChildren(child,action);
	}
}

function makeSmaller(){
	currentFont--;
	var par = $('fontEditableContent');
	par.style.fontSize=currentFont+"px";
	children = par.getChildren();
	enlargeChildren(children,"small");
}
var printWin;
/*function print_page() {
	if(printWin) printWin.close();
	var last = document.location;
	last = new String(last);
	var sym = last.substr(last.length-1,1);
	
	if(last!="/"){
	    printWin = window.open(document.location+"/?print=page","print","width=890,height=900");
	}else{
		printWin = window.open(document.location+"?print=page","print","width=890,height=900");
	}
}*/

function deleteFile(elem,id,type){
	if(type=="page" || type=="level"){
		phpFile="pages";
	}else{
		phpFile="products"
	}
	var req = new Request({  
             method: 'post',  
             url: FOLDERS.domainRoot+"administration/"+phpFile+".php?action=DeleteFile",  
             data: { 'id' : id , 'type' : type },  
               
             onComplete: function(response) { 
             	      if(response=='success'){
             	      	 el=$('pos_'+elem);
             	      	 el.parentNode.removeChild(el);
             	      	
             	      }
             
             }  
        }).send(); 
}

function showOptions(){
	document.getElementById('aditionalOptions').style.display="block";
}

function redirect(url){
	if(!url) return;
	document.location.href = url;
}

function deleteProductLevelImage(id){
	var req = new Request({  
             method: 'post',  
             url: FOLDERS.domainRoot+"administration/products.php?action=DeleteImage",  
             data: { 'id' : id },  
               
             onComplete: function(response) { 
             	      if(response=='success'){
             	      	 el=$('pos_image');
             	      	 el.parentNode.removeChild(el);
             	      	
             	      }
             
             }  
        }).send(); 
}

function addField(){
	var par = document.getElementById('fieldsContainer');
	
	if(par.getElementsByTagName('input').length>0){
	    
		var clone = par.childNodes[1].cloneNode(true);
	    par.appendChild(clone);
	}else{
	  
		par.innerHTML+="<span style='color:black;display:block' >Количество:<input type='text' name='quantity[]'>&nbsp;Цена:<input type='text' name='price[]' ><input type='button' value='x'  onclick='deleteField(this.parentNode)'></span>";
	}
	
	
	
}

function deleteField(obj){
	obj.parentNode.removeChild(obj);
}

function deleteEditPropertie(object){
	
	var obje=object.parentNode;
	obje.parentNode.removeChild(obje);
}
function hideSubmenuSpec(){
	
	if(cancelHide2==false){
	  //document.getElementById("subnavUniqueId").style.display="none";
	}
}
function cancelHide(){
	
	cancelHid2e=true;
}
var status = 'hidden';

function hideIt(e,obj){
	if(status=='shown'){
		obj.start({
					'height': [93, 0],
					'opacity': [1,0]
				});
				
		status='hidden';
	}
}

function showIt(e,obj){
	if(status=='hidden'){
		$('subnav').addEvent('maouseover',function(e){ laert('over sub');})
		
		obj.start({
							'height': [0, 93],
							'opacity': [0,1]
						});
		status='shown';
	}
	
				
}

if(typeof window.addEvent == 'function') { 
window.addEvent('domready', function() {
   
	if($("menu")){
    	var subnavFX = new Fx.Morph('subnav', {duration: 'short', transition: Fx.Transitions.Sine.easeOut});
		 $("menu").addEvent("mouseenter",function(e) {
	     	subnavFX.cancel();
		 	showIt(e,subnavFX);
	     });
	     $("menu").addEvent("mouseleave",function(e) {
	     	subnavFX.cancel();
			hideIt(e,subnavFX);
	     });
    }
});
}

function dlImg(id,type){
	
	if(type=="news"){
		phpFile="news";
	}else{
		phpFile="exhibitions"
	}
	var url = FOLDERS.domainRoot+"administration/"+phpFile+".php?action=DeleteImage&id="+id;
      new Ajax.Request(url ,{  
             method: 'get',    
             onComplete: function(response) { 
             	     
             	if(response.status==200){
             	      	 el=$('imageDisplay');
             	      	 el.parentNode.removeChild(el);
             	      	
             	      }
             
             },
             onFailure: function (response){
             	alert('failed');
             }
        });
}

function dlImgN(id,type){
	
	phpFile = type;
	
	var url = FOLDERS.domainRoot+"administration/"+phpFile+".php?action=DeleteImage&id="+id;
      new Ajax.Request(url ,{  
             method: 'get',    
             onComplete: function(response) { 
             	     
             	if(response.status==200){
             	      	 el=$('imageDisplay');
             	      	 el.parentNode.removeChild(el);
             	      	
             	      }
             
             },
             onFailure: function (response){
             	alert('failed');
             }
        });
}

function deleteProdImage(id){
	
	phpFile = 'news';
	
      
        
        var req = new Request({  
             method: 'post',  
             url: FOLDERS.domainRoot+"administration/"+phpFile+".php?action=deleteImage",  
             data: { 'id' : id },  
               
             onComplete: function(response) { 
             	      if(response=='success'){
             	      	 
             	      	 el2=$('nImage_'+id);
             	      	 el2.innerHTML = '<input type="file" style="min-width: 0pt;" name="file" class="textField"/><span style="padding-left:80px;color:red">Препоръчителен размер: 736x652 px</span>';
             	      	
             	      }
             
             }  
        }).send();
        
        
 }
 
 
 function deleteGalleryImage(id){
 	phpFile = 'gallery';
	
    new Ajax.Request(FOLDERS.domainRoot+"administration/"+phpFile+".php?action=deleteImageF&id="+id, {
		  method: 'get',
		  onSuccess: function(transport) {
		    window.location = window.location;
		  }
	});
  
        
      /*  var req = new Request({  
             method: 'post',  
             url: FOLDERS.domainRoot+"administration/"+phpFile+".php?action=deleteImage",  
             data: { 'id' : id },  
               
             onComplete: function(response) { 
             	      if(response=='success'){
             	      	 
             	      	 window.location = window.location;
             	      	
             	      }
             
             }  
        }).send();*/
 }

function changeImage(name){
	
	document.getElementById('firstImageZoom').href=name+"&type=photo2";
	document.getElementById('firstImageTag').src=name+"&type=photo";
	document.getElementById('firstImageTag').src = document.getElementById('firstImageTag').src+"#";
	
}

function showExtraOptions(){
	document.getElementById('extraOptions_1').style.display="block";
	document.getElementById('extraOptions_2').style.display="block";
}

function getToggler(toggler,element){
    
	
	var index = toggler.id.substr(4);
	index = parseInt(index);
	var finalElement = document.getElementById('text_link_'+index);
	
	
	finalElement.innerHTML='Затвори въпроса';
	finalElement.onclick=function(){ acc.display(index);  };
	
}

function removeToggler(toggler,element){
      
	
	
	var index = toggler.id.substr(4);
	index = parseInt(index);
	var finalElement = document.getElementById('text_link_'+index);
	
	finalElement.innerHTML='Прочети повече';
	finalElement.onclick=function(){  acc.display(index) };
	
}

function setOpeners(){
	
	for(var a=1;a<acc.elements.length;a++){
	
	    var finalElement = document.getElementById('text_link_'+a);
	    finalElement.innerHTML='Прочети повече';
	    finalElement.onclick = displCont(a); 
	}
	
	
}

function displCont(index){
	
	acc.display(index);
}

var tip,tip2,tip3,tip4;

function g(id){
	return document.getElementById(id);
}


var tip,tip2,tip3,tip4;
var vtip,vtip2,vtip3,vtip4,vtip5;

function verifyInquiry(){
    var result=true;   

       var validMail;
       var exp=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/i;
       validMail=exp.test(g("mail").value);
       
      var name,phone,mail,code;
      
      name = g('name').value;
      theme = g('tel').value;
      mail = g('mail').value;
      message = g('theme').value;
      code = g('code').value;
      
      

      
      if(name.length==0){
       	   result=false;
       	   g('name').title="<span class='custTooltip'>"+LABELS.FieldMandatory+"</span>";
       	   g('name').style.borderBottom="1px dashed red";
       	   vtip = new Tips("#name");
       }else{
       	   
           g('name').style.borderBottom="none";
       	   if(typeof vtip != "undefined"){
       	    
       	   	vtip.detach("#name");
       	   	  
       	   }
       }
       
       if(message==0){
       	   result=false;
       	   g('theme').title="<span class='custTooltip'>"+LABELS.FieldMandatory+"</span>";
       	   g('theme').style.borderBottom="1px dashed red";
       	   vtip5 = new Tips("#theme");
       }else{
       	   
           g('theme').style.borderBottom="none";
       	   if(typeof vtip5 != "undefined"){
       	    
       	   	vtip5.detach("#theme");
       	   	  
       	   }
       }
       
       if(theme.length==0){
       	   result=false;
       	   g('tel').title="<span class='custTooltip'>"+LABELS.FieldMandatory+"</span>";
       	   g('tel').style.borderBottom="1px dashed red";
       	   vtip2 = new Tips("#tel");
       }else{
           g('tel').style.borderBottom="none";
       	   if(typeof vtip2 != "undefined"){
       	    
       	   	vtip2.detach("#tel");
       	   	  
       	   }
       }
       
       if(code.length==0){
       	   result=false;
       	   g('code').title="<span class='custTooltip'>"+LABELS.FieldMandatory+"</span>";
       	   g('code').style.borderBottom="1px dashed red";
       	   vtip3 = new Tips("#code");
       }else{
       	    
           g('code').style.borderBottom="none";
       	   if(typeof vtip3 != "undefined"){
       	    
       	   	vtip.detach("#code");
       	   	  
       	   }
       }
       
       if(!validMail){
       	   result=false;
       	   g('mail').title="<span class='custTooltip'>"+LABELS.InvalidMail+"</span>";
       	   g('mail').style.borderBottom="1px dashed red";
       	   vtip4 = new Tips("#mail");
       }else{
           
           g('mail').style.borderBottom="none";
       	   if(typeof vtip4 != "undefined"){
       	    
       	   	vtip.detach("#mail");
       	   	  
       	   }
       }
      
       return result; 
    
}

function verifyContacts(){
    var result=true;   

       var validMail;
       var exp=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/i;
       validMail=exp.test(g("mail").value);
       
      var name,phone,mail,code;
      
      name = g('name').value;
      theme = g('theme').value;
      mail = g('mail').value;
      message = g('textarea').value;
      code = g('code').value;
      
      

      
      if(name.length==0){
       	   result=false;
       	   g('name').title="<span class='custTooltip'>"+LABELS.FieldMandatory+"</span>";
       	   g('name').style.borderBottom="1px dashed red";
       	   vtip = new Tips("#name");
       }else{
       	   
           g('name').style.borderBottom="none";
       	   if(typeof vtip != "undefined"){
       	    
       	   	vtip.detach("#name");
       	   	  
       	   }
       }
       
       if(message==0){
       	   result=false;
       	   g('textarea').title="<span class='custTooltip'>"+LABELS.FieldMandatory+"</span>";
       	   g('textarea').style.borderBottom="1px dashed red";
       	   vtip5 = new Tips("#textarea");
       }else{
       	   
           g('textarea').style.borderBottom="none";
       	   if(typeof vtip5 != "undefined"){
       	    
       	   	vtip5.detach("#textarea");
       	   	  
       	   }
       }
       
       if(theme.length==0){
       	   result=false;
       	   g('theme').title="<span class='custTooltip'>"+LABELS.FieldMandatory+"</span>";
       	   g('theme').style.borderBottom="1px dashed red";
       	   vtip2 = new Tips("#theme");
       }else{
           g('theme').style.borderBottom="none";
       	   if(typeof vtip2 != "undefined"){
       	    
       	   	vtip2.detach("#theme");
       	   	  
       	   }
       }
       
       if(code.length==0){
       	   result=false;
       	   g('code').title="<span class='custTooltip'>"+LABELS.FieldMandatory+"</span>";
       	   g('code').style.borderBottom="1px dashed red";
       	   vtip3 = new Tips("#code");
       }else{
       	    
           g('code').style.borderBottom="none";
       	   if(typeof vtip3 != "undefined"){
       	    
       	   	vtip.detach("#code");
       	   	  
       	   }
       }
       
       if(!validMail){
       	   result=false;
       	   g('mail').title="<span class='custTooltip'>"+LABELS.InvalidMail+"</span>";
       	   g('mail').style.borderBottom="1px dashed red";
       	   vtip4 = new Tips("#mail");
       }else{
           
           g('mail').style.borderBottom="none";
       	   if(typeof vtip4 != "undefined"){
       	    
       	   	vtip.detach("#mail");
       	   	  
       	   }
       }
      
       return result; 
    
}


function initPages(){
	window.onkeypress=function(e){
		     if(e.charCode==116 && e.ctrlKey && e.altKey){ 
		     	      showUndeletables();
		     }
	} 
	
	
	new Sortables($('main'),{
		       opacity:0.34,
		       onSort:function(){ 
		       	      var tmp_id='';
		       	      var tmp_ordrer='';
		       	      this.serialize($('main'),function(element,index){
		       	      	                                   if(element.id){tmp_ordrer+=index+'|'; tmp_id+=element.getAttribute('id')+'|';}
		       	                               });
		       	      var req = new Request.JSON({
		       	      	      url:FOLDERS.domainRoot+'administration/pages.php?action=updatePosition',
		       	      	      onSuccess:function(response){ 
		       	      	      	           
		       	      	                }}).post({'sort':tmp_ordrer,'id':tmp_id}); }});
		       	      	                
    var elems = $$('div.col1');
    var a = 0;
    
    for(a=0;a<elems.length;a++){
    	elems[a].addEvent('mouseover',function(){ this.style.cursor= "n-resize"});
    }
}

var loadedGalleries = new Array();
var galleryImages = new Array();
var submitedImages = new Array();



function prepareGallery(images,id,start){
	
    
	loadedGalleries[id] = new Array();
	submitedImages[id] = images;
	
	var  a;
	galleryImages[id] = images.length;
	loadedGalleries[id][0] = new Image();
	loadedGalleries[id][0].src = images[0];
	
	loadedGalleries[id][1] = new Image();
	loadedGalleries[id][1].onload = function(){ 
		     
		     setTimeout(function() {
				rotateAll(id,2);
			},3000);
		}
	loadedGalleries[id][1].src = images[1];
	
}



function rotateAll(id,index){
	galleryImages[id]--;
	
	if(galleryImages[id]>0){
		
		loadedGalleries[id][index] = new Image();
		
		loadedGalleries[id][index].onload = function(){
			setTimeout(function() {
				rotateAll(id,index+1);
			}, 3000);
		}
		loadedGalleries[id][index].src = submitedImages[id][index-1];
		
		var way = "in";
		$(id).getParent().setStyle('background-image','url('+loadedGalleries[id][index].src+')');
		var myFx = new Fx.Tween($(id),{
			duration:800,
			onComplete:function() {
			  if(way == "in"){	
			    $(id).src = loadedGalleries[id][index].src;
				myFx.start("opacity",0,1);
				way = "aout";
			  }
			}
		});
	
        
		myFx.start("opacity",1,0);
	}else{
		if(galleryImages[id]==0){ index=0; }
		
		var way = "in";
		$(id).getParent().setStyle('background-image','url('+loadedGalleries[id][index].src+')');
		var myFx = new Fx.Tween($(id),{
			duration:800,
			onComplete:function() {
			  if(way == "in"){	
			   // 
			  	$(id).src = loadedGalleries[id][index].src;
				myFx.start("opacity",0,1);
				
				if(index<loadedGalleries[id].length-1){
					index++;
				}else{
					index=0;
				}
				
				setTimeout('rotateAll("'+id+'",'+index+')',5000);
				
				way = "aout";
			  }
			}
		});
	
        myFx.start("opacity",1,0);
		
		
		
		
		
	}
	
}


function deleteNewsImage(){
	
}

function changeStyles(){
	window.print();
}

function test(obj){ alert('called'); }
function playTracker( obj )
{
alert('test');
// 'obj' VALUES
// - index
// - id
// - client
// - version

alert( obj.id );
} 
function playerReady(obj) {
	var player = document.getElementById(obj['id']);
	console.log(player);
	player.addViewListener( 'PLAY', 'playTracker' );
};


function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}else var expires="";document.cookie=name+"="+value+expires+"; path=/";}function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}return null;}
