var nc="";
var ist="";
function tg(gc,ml) {
	if ((nc!='')&&(nc!=gc))	tg(nc,ml);
	var gcm = document.getElementById(gc);
	var gcx = document.getElementById(gc+'o');
	var status=gcx.style.visibility;
	/*if (status == "hidden" || !status){      
		gcm.style.background= "url(/i/l"+ml+".gif) top right no-repeat";      
	} else {
		gcm.style.background= "url(/i/m"+ml+".gif) top right no-repeat";      
	}*/
	gcx.style.visibility= "visible";      
	gcx.style.display= "block";
	if(nc!=gc)	nc=gc;
	else	nc='';
	ef = new fx.Height(gcx, {duration: 200, onComplete: function(){
		if (status == "visible")	{
			gcx.style.visibility= "hidden";
			gcx.style.display= "none";
		}
	}}); 
	ef.toggle();
}
function tg2(gc,st) {
	var gcx = document.getElementById(gc);
	var gcm = document.getElementById(gc+'o');

if (st == 1 && (gcm.className == "mmm" || !gcm.className) ){      
	gcx.style.display= "block";      
	ef = new fx.Height(gcx, {duration: 250}); 
	ef.custom(0,gcx.scrollHeight);
	gcm.className= "mlm";   
}
else if (gcm.className == "mlm"){
	gcm.className= "mmm";
	ef = new fx.Height(gcx, {duration: 50,onComplete: function(){gcx.style.display= "none";}}); 
	ef.custom(gcx.scrollHeight,0);
	
}

else if (st==3){
	gcx.style.display= "block";      
	ef = new fx.Height(gcx, {duration: 200}); 
	ef.toggle();
	if (gcm.className == "mm"){gcm.className= "ml";} else {gcm.className= "mm";}
}


}

function get_random(num)
{
    var ranNum= Math.floor(Math.random()*num);
    return ranNum;
}

function get_bg(){
	bh=document.getElementById('main_home');
	n=0;
	while(n==0)	n=get_random(40);
//	bh.style.backgroundImage="url(img/bghome/bg_new.jpg)";
	bh.style.backgroundImage="url(img/bghome/bg_"+n+".jpg)";
	
	//alert(bh.style.backgroundImage)
}