function getElementsByClassName(oElm, strTagName, strClassName){
    var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName);
    var arrReturnElements = new Array();
    strClassName = strClassName.replace(/\-/g, "\\-");
    var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
    var oElement;
    for(var i=0; i<arrElements.length; i++){
        oElement = arrElements[i];      
        if(oRegExp.test(oElement.className)){
            arrReturnElements.push(oElement);
        }   
    }
    return (arrReturnElements)
}
function AttachEvent(elementObj, eventName, eventHandlerFunctionName)
{
  if (elementObj.addEventListener) 
  { 
    elementObj.addEventListener(eventName, eventHandlerFunctionName, false);		
  } 
  else if (elementObj.attachEvent) 
  { 
    elementObj.attachEvent('on' + eventName, eventHandlerFunctionName);
  } 
  else 
  { 
    var currentEventHandler = elementObj['on' + eventName];
    if (currentEventHandler == null) 
    {
      elementObj['on' + eventName] = eventHandlerFunctionName;
    } 
    else 
    {
      elementObj['on' + eventName] = function(e) { currentEventHandler(e); eventHandlerFunctionName(e); }
    }
  }
}
function select_all() {
	thedoc = document.getElementById('list_makes');
	with(thedoc.getElementsByTagName('input')) {
		for(i=0;i<thedoc.getElementsByTagName('input').length;i++) {
			thiselm = thedoc.getElementsByTagName('input')[i];
			if(thiselm.name.substring(0,6) == 'marca_')
				thiselm.checked = !thiselm.checked
		}
	}
}
function select_anunturi() {
	thedoc = document.getElementById('list_anunturi');
	with(thedoc.getElementsByTagName('input')) {
		for(i=0;i<thedoc.getElementsByTagName('input').length;i++) {
			thiselm = thedoc.getElementsByTagName('input')[i];
			if(thiselm.name.substring(0,6) == 'anunt_')
				thiselm.checked = !thiselm.checked
		}
	}
}

function check_all(container_id) {
	thedoc = document.getElementById(container_id);
	with(thedoc.getElementsByTagName('input')) {
		for(i=0;i<thedoc.getElementsByTagName('input').length;i++) {
			thiselm = thedoc.getElementsByTagName('input')[i];
			if(thiselm.name.substring(0,6) == 'anunt_')
				thiselm.checked = !thiselm.checked
		}
	}
}

function selecteaza_tot(container_id) {
	thedoc = document.getElementById(container_id);
	with(thedoc.getElementsByTagName('input')) {
		for(i=0;i<thedoc.getElementsByTagName('input').length;i++) {
			thiselm = thedoc.getElementsByTagName('input')[i];
			thiselm.checked = !thiselm.checked
		}
	}
}

function select_garaj() {
	thedoc = document.getElementById('list_parks');
	with(thedoc.getElementsByTagName('input')) {
		for(i=0;i<thedoc.getElementsByTagName('input').length;i++) {
			thiselm = thedoc.getElementsByTagName('input')[i];
				thiselm.checked = !thiselm.checked
		}
	}
}
function toggle_menu_add () {
	if ( document.getElementById('menu_add').style.display == "" )
		{
			new Effect.BlindUp('menu_add',{duration: 1});
		}
	else 
		{
			new Effect.BlindDown('menu_add',{duration: 1});
		}
}
function init_menu() {
	document.getElementById('main_menu').style.display = "";
}
function show_per_page(url,nr) {
	new_url = url + nr ;
	//alert(new_url);
	window.location=url+nr;
}
function car_makes(url,act) {
	document.getElementById('sel_action').value=act;
	document.forms["act_makes"].submit();
}
function sari_marci(id,name) {
	name = name.replace(' ','_');
	window.location='../'+id+'_'+name+'/1'
}
function sari_marci_top(id,name) {
	name = name.replace(' ','_');
	window.location='/showroom/'+id+'_'+name+'/1'
}
function sari_la_marca_cautare(id) {
	window.location= window.location + '&pagina=1&marca='+id;
}
function sari_marci_admin(query,id) {
	window.location=window.location + '&marca='+id ;
}
function sari_marci_topuri(query,id) {
	window.location=query + '?anul='+document.main_topuri.top_year.value+'&marca='+id ;
}
function sari_localitati_admin(query,id) {
	window.location=window.location + '&localitate='+id ;
}
function sari_modele_admin(id) {
	window.location = window.location + "&model="+id;
}
function jump_marci(selectId) {
		
		var selObj = document.getElementById(selectId);

		
		//alert(selObj.style.display);
		var xmldoc=getResponse('xml');
		if (!xmldoc) return false;
		
		var opts = xmldoc.getElementsByTagName('options')[0];
		if (!opts) {
			selObj.length=0;
			selObj[0]=new Option('--eroare--','-1');
			return false;
		}
		var elems = opts.getElementsByTagName('option');
		selObj.length=0;
		var val=-1;
		var txt='error';
		var opt;
		for(i=0;i<elems.length;i++) {
			val=elems[i].getAttribute("value");
			txt=elems[i].getAttribute("text");
			sel=elems[i].getAttribute("select");
			dis=elems[i].getAttribute("disable");
			selObj[i]=new Option(txt,val,'false',sel);
		}
	 }
function jump_marci_2(selectId) {
		
		var selObj = document.getElementById(selectId);

		
		//alert(selObj.style.display);
		var xmldoc=getResponse('xml');
		if (!xmldoc) return false;
		
		var opts = xmldoc.getElementsByTagName('options')[0];
		if (!opts) {
			selObj.length=0;
			selObj[0]=new Option('--eroare--','-1');
			return false;
		}
		var elems = opts.getElementsByTagName('option');
		selObj.length=0;
		var val=-1;
		var txt='error';
		var opt;
		for(i=0;i<elems.length;i++) {
			val=elems[i].getAttribute("value");
			txt=elems[i].getAttribute("text");
			sel=elems[i].getAttribute("select");
			dis=elems[i].getAttribute("disable");
			selObj[i]=new Option(txt,val,'false',sel);
		}
	 }
	 
function auto_marci(selectId) {
		
		var selObj = document.getElementById(selectId);

		
		//alert(selObj.style.display);
		var xmldoc=getResponse('xml');
		if (!xmldoc) return false;
		
		var opts = xmldoc.getElementsByTagName('options')[0];
		if (!opts) {
			selObj.length=0;
			selObj[0]=new Option('--eroare--','-1');
			return false;
		}
		var elems = opts.getElementsByTagName('option');
		selObj.length=0;
		var val=-1;
		var txt='error';
		var opt;
		for(i=0;i<elems.length;i++) {
			val=elems[i].getAttribute("value");
			txt=elems[i].getAttribute("text");
			sel=elems[i].getAttribute("select");
			dis=elems[i].getAttribute("disable");
			selObj[i]=new Option(txt,val,'false',sel);
		}
	 }
	 
function jump_modele(selectId) {
		
		
		var selObj = document.getElementById(selectId);
		var xmldoc=getResponse('xml');
		if (!xmldoc) return false;
		
		var opts = xmldoc.getElementsByTagName('options')[0];
		if (!opts) {
			selObj.length=0;
			selObj[0]=new Option('--eroare--','');
			return false;
		}
		var elems = opts.getElementsByTagName('option');
		selObj.length=0;
		var val=-1;
		var txt='error';
		var opt;
		for(i=0;i<elems.length;i++) {
			val=elems[i].getAttribute("value");
			txt=elems[i].getAttribute("text");
			sel=elems[i].getAttribute("select");
			dis=elems[i].getAttribute("disable");
			selObj[i]=new Option(txt,val,sel,dis);
		}
}
function auto_modele(selectId) {
		
		
		var selObj = document.getElementById(selectId);
		var xmldoc=getResponse('xml');
		if (!xmldoc) return false;
		
		var opts = xmldoc.getElementsByTagName('options')[0];
		if (!opts) {
			selObj.length=0;
			selObj[0]=new Option('--eroare--','');
			return false;
		}
		var elems = opts.getElementsByTagName('option');
		selObj.length=0;
		var val=-1;
		var txt='error';
		var opt;
		for(i=0;i<elems.length;i++) {
			val=elems[i].getAttribute("value");
			txt=elems[i].getAttribute("text");
			sel=elems[i].getAttribute("select");
			dis=elems[i].getAttribute("disable");
			selObj[i]=new Option(txt,val,sel,dis);
		}
}
function switch_div(denumire) {
	the_div =  document.getElementById('div_'+denumire);
	title_div = document.getElementById('toggle_'+denumire);
	arata = the_div.style.display;
	if  ( arata != "none" ) {
		the_div.style.display = "none";
		title = title_div.innerHTML;
		title_div.innerHTML = "arata";
	}
	else {
		the_div.style.display = "";
		title = title_div.innerHTML;
		title_div.innerHTML = "ascunde";
	}
}
function switch_div_nt(denumire) {
	the_div =  document.getElementById('div_'+denumire);
	arata = the_div.style.display;
	if  ( arata != "none" ) {
		the_div.style.display = "none";
	}
	else {
		the_div.style.display = "";
	}
}
function switch_tbl_prom(id) {
	the_div =  document.getElementById('tbl_prom_'+id);
	arata = the_div.style.display;
	if  ( arata != "none" ) {
		new Effect.toggle(the_div,'appear' );
	}
	else {
		new Effect.toggle(the_div,'appear' );
	}
}
function switch_promos(id_1,id_2,id_3) {
	var tab_1  = document.getElementById(id_1);
	var tab_2  = document.getElementById(id_2);
	var tab_3  = document.getElementById(id_3);
	if ( tab_1.style.display != "" ) {
		if ( tab_2.style.display != "none" ) {
			new Effect.BlindUp(tab_2);
		}
		if ( tab_3.style.display != "none" ) {
			new Effect.BlindUp(tab_3);
		}
		
		new Effect.BlindDown(tab_1);
		
		tab_2.style.display = "none";
		tab_3.style.display = "none";
	}

}
function nimic() {
	return false;
}
function blind_div(denumire) {
	var denumire;
	the_div = document.getElementById('div_'+denumire);
	title_div = document.getElementById('toggle_'+denumire);
	arata = the_div.style.display;
	if  ( arata != "none" ) {
		the_div.style.display = "none";
		title_div.innerHTML = "arata";
	}
	else {
		
		
		the_others = document.getElementsByTagName('span');
		for (i=0;i<the_others.length;i++) {
			thiselm = the_others[i];
			it_id = thiselm.id;
			//alert(it_id);
			if ( it_id.substring(0,7) == "toggle_" ) {
				the_main_div = it_id.substring(7, it_id.length);
				//alert(the_main_div);
				thiselm.innerHTML = "arata";
				document.getElementById('div_'+the_main_div).style.display = "none";
			}
		}
		the_div.style.display = "";
		title_div.innerHTML = "ascunde";
	}
}




function pop_fields(marca,model) {
	
	var xmldoc=getResponse_pop('xml');
	if (!xmldoc) return false;
	
	var fields = xmldoc.getElementsByTagName('fields')[0];
	
	if (!fields) {
		return false;
	}
	var elems = fields.getElementsByTagName('field');
	
	
	for(i=0;i<elems.length;i++) {
			label = elems[i].getAttribute("name");
			val=elems[i].getAttribute("text");
			//alert(label+' - ' +val);
			document.getElementById(label).value = val;
		}
	
}
function captcha_reload(id) {
	theImg=document.getElementById(id);
	theImg.src +='?'+ Math.round(Math.random()*100000);
}
function getPageScroll(){

	var yScroll;

	if (self.pageYOffset) {
			yScroll = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){      // Explorer 6 Strict
			yScroll = document.documentElement.scrollTop;
	} else if (document.body) {// all other Explorers
			yScroll = document.body.scrollTop;
	}

	arrayPageScroll = new Array('',yScroll)
	return arrayPageScroll;
}



 	// getPageSize()
 	// Returns array with page width, height and window width, height
 	// Core code from - quirksmode.org
 	// Edit for Firefox by pHaez
 	//
 	function getPageSize(){
 	       
 	        var xScroll, yScroll;
 	       
 	        if (window.innerHeight && window.scrollMaxY) { 
 	                xScroll = document.body.scrollWidth;
 	                yScroll = window.innerHeight + window.scrollMaxY;
 	        } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
 	                xScroll = document.body.scrollWidth;
 	                yScroll = document.body.scrollHeight;
 	        } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
 	                xScroll = document.body.offsetWidth;
 	                yScroll = document.body.offsetHeight;
 	        }
 	       
 	        var windowWidth, windowHeight;
 	        if (self.innerHeight) { // all except Explorer
 	                windowWidth = self.innerWidth;
 	                windowHeight = self.innerHeight;
 	        } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
 	                windowWidth = document.documentElement.clientWidth;
 	                windowHeight = document.documentElement.clientHeight;
 	        } else if (document.body) { // other Explorers
 	                windowWidth = document.body.clientWidth;
 	                windowHeight = document.body.clientHeight;
 	        }       
 	       
 	        // for small pages with total height less then height of the viewport
 	        if(yScroll < windowHeight){
 	                pageHeight = windowHeight;
 	        } else {
 	                pageHeight = yScroll;
 	        }
 	
 	        // for small pages with total width less then width of the viewport
 	        if(xScroll < windowWidth){     
 	                pageWidth = windowWidth;
 	        } else {
 	                pageWidth = xScroll;
 	        }
 	
 	
 	        arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
 	        return arrayPageSize;
 	}
function enable_disable(src,target) {
	if (document.getElementById(src).checked == true )
	{
		document.getElementById(target).removeAttribute("disabled");	
	}
	else {
		document.getElementById(target).setAttribute("disabled","true");	
	}
}

function check_nr_modele(id) {
	alert(id);
}
function sari_stiri_cat(id) {
	if ( id != "" ) {
		document.location = "stiri_main.php?cat="+id;
	}
	
}
var drivetest_counter = 1;
function create_pro_contra() {
	
	drivetest_counter++;
	//alert(drivetest_counter);
	
	var place 	= document.getElementById('to_insert');
	var the_tr = document.createElement('tr');
	var the_td_1 = document.createElement('td');
	var the_td_2 = document.createElement('td');
	var the_td_3 = document.createElement('td');
	var the_content_1 = document.createElement('input');
	var the_content_2 = document.createElement('input');
	var the_content_3 = document.createElement('input');
	
	the_text_1 = document.createTextNode('Pro');
	the_text_2 = document.createTextNode('Contra');
	
	the_content_1.setAttribute('class','general_inputs_custom');
	the_content_1.setAttribute('name','label_'+drivetest_counter);
	
	the_content_2.setAttribute('type','radio');
	the_content_2.setAttribute('name','value_'+drivetest_counter);
	the_content_2.setAttribute('value','pro');
	
	the_content_3.setAttribute('type','radio');
	the_content_3.setAttribute('name','value_'+drivetest_counter);
	the_content_3.setAttribute('value','contra');
	
	the_td_1.setAttribute('width','140');
	
	the_td_2.setAttribute('width','150');
	the_td_2.setAttribute('bgcolor','#009933');
	
	the_td_3.setAttribute('width','150');
	the_td_3.setAttribute('bgcolor','#FF0000');
	
	the_td_1.appendChild(the_content_1);
	the_td_2.appendChild(the_content_2);
	the_td_2.appendChild(the_text_1);
	the_td_3.appendChild(the_content_3);
	the_td_3.appendChild(the_text_2);
	
	the_tr.appendChild(the_td_1);
	the_tr.appendChild(the_td_2);
	the_tr.appendChild(the_td_3);
	place.appendChild(the_tr);
}
function toggle_div(id) {
	//alert(id);
		if ( document.getElementById(id).style.display == "" )
		{
			new Effect.BlindUp(id,{duration: 1});
		}
	else 
		{
			new Effect.BlindDown(id,{duration: 1});
		}
}
function toggle_div_txt(id,txt_id) {
	//alert(id);
		if ( document.getElementById(id).style.display == "" )
		{
			new Effect.BlindUp(id,{duration: 1});
			$(txt_id).innerHTML = 'arata <img src="images/arr_down.png" width="5" height="4">';
		}
	else 
		{
			new Effect.BlindDown(id,{duration: 1});
			$(txt_id).innerHTML = 'ascunde <img src="images/arr_up.png" width="5" height="4">';
		}
}
function add_poll_option(id) {
	new Effect.toggle('float_container','appear' );
	new Draggable('float_container');
	document.getElementById('poll_id').value = id;
}
function rem_poll_option() {
	new Effect.toggle('float_container','appear' );
}
function do_not_logged() {
	float_div_appear('error_container');
	if ( typeof arguments[0] == "undefined" ) {
		$('floater_text').innerHTML = 'Ne pare rau, pentru a vota aceasta poza trebuie mai intai sa va logati. <a href="http://autozone.phg.ro/intra"><b>Login</b></a><br>Daca nu aveti cont, va rugam sa va <a href="http://autozone.phg.ro/inregistrare"><b>inregistrati</b></a>';
	}
	else {
		$('floater_text').innerHTML = arguments[0];
	}
}
function float_div_appear(id) {
	scroll(0,0);
	new Effect.toggle(id,'appear' );
	//new Draggable(id);

}
function float_div_close(id) {
	new Effect.toggle(id,'appear' );
	$(id).style.display = "none";
}
function valid_quick_search() {
	return true;
}
function switch_tabs_3(t1,t2,t3) {
	var tab_1  = document.getElementById(t1);
	var tab_2  = document.getElementById(t2);
	var tab_3  = document.getElementById(t3);
	if ( tab_1.style.display != "" ) {
		if ( tab_2.style.display != "none" ) {
			new Effect.BlindUp(tab_2,{duration:0.3});
			document.getElementById('button_'+t2).className="tab_pasive";
		}
		if ( tab_3.style.display != "none" ) {
			new Effect.BlindUp(tab_3,{duration:0.3});
			document.getElementById('button_'+t3).className="tab_pasive";
		}
		
		new Effect.BlindDown(tab_1,{duration:0.3});
		
		tab_2.style.display = "none";
		tab_3.style.display = "none";
		
		document.getElementById('button_'+t1).className="tab_pressed";
	}
}
function switch_tabs_2(t1,t2) {
	var tab_1  = document.getElementById(t1);
	var tab_2  = document.getElementById(t2);
	if ( tab_1.style.display != "" ) {
		if ( tab_2.style.display != "none" ) {
			new Effect.BlindUp(tab_2,{duration:0.3});
			document.getElementById('button_'+t2).className="tab_pasive";
		}
		new Effect.BlindDown(tab_1,{duration:0.3});
		
		tab_2.style.display = "none";
		
		document.getElementById('button_'+t1).className="tab_pressed";
	}
}
function switch_tabs_firme(t1,t2,t3,t4) {
	var tab_1  = document.getElementById(t1);
	var tab_2  = document.getElementById(t2);
	var tab_3  = document.getElementById(t3);
	var tab_4  = document.getElementById(t4);
	if ( tab_1.style.display != "" ) {
		if ( tab_2.style.display != "none" ) {
			new Effect.BlindUp(tab_2,{duration:1.2});
			document.getElementById('button_'+t2).className="inactive";
		}
		if ( tab_3.style.display != "none" ) {
			new Effect.BlindUp(tab_3,{duration:1.2});
			document.getElementById('button_'+t3).className="inactive";
		}
		if ( tab_4.style.display != "none" ) {
			new Effect.BlindUp(tab_4,{duration:1.2});
			document.getElementById('button_'+t4).className="inactive";
		}
		new Effect.BlindDown(tab_1,{duration:1.2});
		
		tab_2.style.display = "none";
		tab_3.style.display = "none";
		tab_4.style.display = "none";
		
		document.getElementById('button_'+t1).className="active";
	}
}
function switch_tab(t1,t2,t3,t4,t5,t6) {
	var tab_1  = document.getElementById(t1);
	var tab_2  = document.getElementById(t2);
	var tab_3  = document.getElementById(t3);
	var tab_4  = document.getElementById(t4);
	var tab_5  = document.getElementById(t5);
	var tab_6  = document.getElementById(t6);
	if ( tab_1.style.display != "" ) {
		if ( tab_2.style.display != "none" ) {
			new Effect.BlindUp(tab_2);
			document.getElementById('button_'+t2).className="tab_pasive";
		}
		if ( tab_3.style.display != "none" ) {
			new Effect.BlindUp(tab_3);
			document.getElementById('button_'+t3).className="tab_pasive";
		}
		if ( tab_4.style.display != "none" ) {
			new Effect.BlindUp(tab_4);
			document.getElementById('button_'+t4).className="tab_pasive";
			
		}
		if ( tab_5.style.display != "none" ) {
			new Effect.BlindUp(tab_5);
			document.getElementById('button_'+t5).className="tab_pasive";
			
		}
		if ( tab_6.style.display != "none" ) {
			new Effect.BlindUp(tab_6);
			document.getElementById('button_'+t6).className="tab_pasive";
			
		}
		
		new Effect.BlindDown(tab_1);
		
		tab_2.style.display = "none";
		tab_3.style.display = "none";
		tab_4.style.display = "none";
		tab_5.style.display = "none";
		tab_6.style.display = "none";
		
		document.getElementById('button_'+t1).className="tab_pressed";
	}
}
function switch_classes(id,class_1,class_2) {
	if ( document.getElementById(id).className != "tab_pressed" ){
		if ( document.getElementById(id).className == class_1 )
			document.getElementById(id).className = class_2
		else
			document.getElementById(id).className = class_1
	}
}
function jump_drivetest(url) {
	document.location = url ;
}

function update_banner(banner_id) {
	//alert(banner_id);
	new Ajax.Request('banners.php', {asynchronous:true,method:'get',parameters:'action=increment_click&banner_id='+banner_id});
}
var errFunc = function(t) {
    alert('Error ' + t.status + ' -- ' + t.statusText);
}
var handlerFunc = function(t) {
    alert('Response : ' + t.responseText);
}
function show_custom_message(id,text_container,text,url,time) {
	scroll(0,0);
	$(text_container).innerHTML = text;
	new Effect.toggle(id,'appear' );
	new Draggable(id);
	if ( url != "none" ) {
			setTimeout('document.location="'+url+'"',time*1000);
	}
}
function make_arhiva_url() {
	the_luna 	= document.getElementById('arhiva_luna')[document.getElementById('arhiva_luna').selectedIndex].value
	the_an		= document.getElementById('arhiva_an')[document.getElementById('arhiva_an').selectedIndex].value
	if ( the_luna != "" && the_luna != 0 && the_an != "" && the_an != 0 ) {
		new_act = 'http://autozone.phg.ro/noutati/arhiva/'+the_an+'/'+the_luna;
		document.forms['vezi_arhiva'].action = new_act;
		document.forms['vezi_arhiva'].submit();
	}
}

function confirm_delete(url,question) {
	test = confirm(question);
	if ( test == true ){
		document.location = url;
		return false;
	}
}

function switch_toggle_div_2() {
	document.getElementById(this.id).onclick = nimic;
	ids = this.id.split("_");
	the_id = ids[1]+"_"+ids[2];
	switch_toggle_div(the_id,this.id);
	
}
function switch_toggle_div(id,caller) {
		document.getElementById(caller).onclick = nimic;
		if ( document.getElementById(id).style.display == "" )
		{
			new Effect.BlindUp(id,{duration: 1,afterFinish: function () { 
			linkurl = document.getElementById(caller) ;
		 	linkurl.onclick = switch_toggle_div_2;
			}
			});
		}
	else 
		{
			new Effect.BlindDown(id,{duration: 1,afterFinish: function () { 
			linkurl = document.getElementById(caller) ;
		 	linkurl.onclick = switch_toggle_div_2;
			}
			});
		}
}
function try_submit_form(form_name,field){
	objs = document.forms[form_name][field];
	if (objs.value != "" ) {
		return true;
	}
	else {
		return false;
	}
}





function switch_hide_toggle_div_2() {
	document.getElementById(this.id).onclick = nimic;
	ids = this.id.split("_");
	the_id = ids[1]+"_"+ids[2];
	switch_hide_toggle_div(the_id,this.id);
	
}
function switch_hide_toggle_div(id,caller) {
		document.getElementById(caller).onclick = nimic;
		if ( document.getElementById(id).style.display == "" )
		{
			new Effect.BlindUp(id,{duration: 1,afterFinish: function () { 
			linkurl = document.getElementById(caller) ;
		 	linkurl.onclick = switch_hide_toggle_div_2;
			}
			});
			new Effect.Appear(caller);
			
		}
	else 
		{
			rest_divs = getElementsByClassName(document,"*","divuri_toggle");
			for ( i=0;i<rest_divs.length;i++) {
				alabala = rest_divs[i].id;
				divs_id = alabala.split("_");
				divs_id = divs_id[0]+"_"+divs_id[1];
				if ( $(divs_id).style.display == "" && divs_id != id ) {
					switch_hide_toggle_div(divs_id,'switcher_'+divs_id);
				}
			}
			new Effect.BlindDown(id,{duration: 1,afterFinish: function () { 
			linkurl = document.getElementById(caller) ;
		 	linkurl.onclick = switch_hide_toggle_div_2;
			}
			});
			
			new Effect.Fade(caller);
		}
}