(function(){ /*Use Object Detection to detect IE6*/ var m = document.uniqueID /*IE*/ && document.compatMode /*>=IE6*/ && !window.XMLHttpRequest /*<=IE6*/ && document.execCommand ; try{ if(!!m){ m("BackgroundImageCache", false, true) /* = IE6 only */ } }catch(oh){}; })();

var hideElement=document.getElementById('allProd');
if (hideElement!=null &&  hideElement!='undefined'){
	setTimeout("budEffectLoad('hideProd')",2000);
}
var accordionElement=null;
var verticalContainer = document.getElementById("vertical_container");
	try{
		accordionElement = $$('h3.accordion_toggle');
	}catch(e){
		// we dont need to do anything, just catch and let the remaining js part run
	}
	//alert(accordionElement.length)
	if (accordionElement != null  && accordionElement.length != 0 ){
		Event.observe(window,'load' ,function(){window.setTimeout("loadAccordions()",200)}, false);
	}
	else{
		//verticalContainer.style.display='none';
	}
function loadAccordions() {
	var bottomAccordion = new accordion('vertical_container');
	// Open first one item
	bottomAccordion.activate($$('#vertical_container .accordion_toggle')[0]);
}
function openProd(){
			budEffect('hideProd');
			el = document.getElementsByClassName('allProd')[0]
			el.hide();
		}
		function budEffect(el){		
       			//new	Effect.toggle(el);
				if (typeof document.body.style.maxHeight == "undefined") {
					 new Effect.toggle(el,'blind', {duration: 3.5});
				}
				new Effect.toggle(el,'blind', {duration: 1.5});
   			}		
		
		function budEffectLoad(el){		
       			new Effect.toggle(el,'blind', {duration: 1.5});
   		}	
		
/**/
/*var visibleElement= true;
function changeVisibility(id, ref){
	var chengeElem = $(id);
	var refElem = $(ref);
	if(ref != null){
		if(visibleElement= true){
			chengeElem.hide();
			chengeElem.style.display='block';
				refElem.show();
		}else{
			chengeElem.show();
			refElem.hide();
		}
	}
	else{
		$(id).hide();
		visibleElement = false
	}
}*/

function changeVisibility(id, ref, active, checkElem){
	if (document.getElementById(ref)!=null &&  document.getElementById(ref)!='undefined'){
		var refElem = $(ref);
	}
	var chengeElem = $(id);
	var activeElem= $(active)
	var relValue= document.getElementById('change-email').getAttribute("rel");
	var relValue2= document.getElementById('change-password').getAttribute("rel");
	var txt=  document.getElementById('change-email').getAttribute("rev");
	var txt2= document.getElementById('change-password').getAttribute("rev");
	if(ref != null){
		if(chengeElem.visible()){
			chengeElem.hide();
			if (activeElem.id=='change-email'){
				activeElem.innerHTML=txt
				activeElem.setAttribute('title', txt)
				
			}
			if (activeElem.id=='change-password'){
				activeElem.innerHTML=txt2
				activeElem.setAttribute('title', txt2)
			}
		}else{
			chengeElem.show();
			if (activeElem.id=='change-email'){
				activeElem.innerHTML=relValue
				activeElem.setAttribute('title', relValue)
				$(checkElem).innerHTML=txt2
				$(checkElem).setAttribute('title', txt2)
			}
			if (activeElem.id=='change-password'){
				activeElem.innerHTML=relValue2
				activeElem.setAttribute('title', relValue2)
				$(checkElem).innerHTML=txt
				$(checkElem).setAttribute('title', txt)
			}
			refElem.hide();
		}
	}
	else{
		$(id).hide();
	}
}

