function gotourl(ids,url){
  document.cookie="idsname="+ids;
  if(document.URL==url||url=="#"){
    window.location.reload();
  }else{
	top.location.href=url;
  }
}
function getcookie(name){
  var cname=name+ "=";
  var dc=document.cookie;
  if(dc.length>0){
	begin=dc.indexOf(cname);
	if(begin!=-1){
		begin+=cname.length;
		end=dc.indexOf(";",begin);
		if(end==-1) end=dc.length;
		return unescape(dc.substring(begin,end));
	}
  }
  return null;
}
var newValue=new String(getcookie('idsname'));

if(newValue=="null"||newValue==null){
  newValue="m0";
}

function loading(){
  var o;
  if(newValue){
  	for(i=0;i<12;i++){//m1~m11
  	  var ids="m"+i;
	  if ((o=document.getElementById(ids)))
   	    o.className="menu";
   	}
    if ((o=document.getElementById(newValue)))
	  o.className="menu_active";
//	  o.style.backgroundImage="url(../share/menu_fk02.jpg)";
//	  o.style.backgroundColor="#3399CC";
  }
}

function chbgover(ids){
  var o;
  if((o=document.getElementById(ids)) && ids!=newValue){
//	  o.style.backgroundColor ="#99CCFF";
	  o.className = "menu_hover";
  }
}
function chbgout(ids){
  var o;
  if(ids!=newValue && (o=document.getElementById(ids))){
	  o.className="menu";
//	  o.style.backgroundColor ="";
  }
}
function chsubbgover(ids){
  var o;
  if((o=document.getElementById(ids)) && ids!=newValue){o.style.backgroundColor ="#ceceee";}else{
  o.style.backgroundColor ="#3399CC";}
}
function chsubbgout(ids){
  var o;
  if(ids!=newValue && (o=document.getElementById(ids))){o.style.backgroundColor ="";}
}
