 function Show_TabADSMenu(tabadid_num,tabadnum){
  for(var i=0;i<2;i++){document.getElementById("tabadcontent_"+tabadid_num+i).style.display="none";}
  for(var i=0;i<2;i++){document.getElementById("tabadmenu_"+tabadid_num+i).className="normal";}
  document.getElementById("tabadmenu_"+tabadid_num+tabadnum).className="active";
  document.getElementById("tabadcontent_"+tabadid_num+tabadnum).style.display="block";
 }
 
function showDiv(num)
{
 for(var id = 1;id<=5;id++)
 {
  var ss="about"+id;
  var nss="aboutnav"+id;
  if(id==num){
 
  try{document.getElementById(ss).style.display="block"}catch(e){};
  try{document.getElementById(nss).className="active"}catch(e){};
  }else{
  try{document.getElementById(ss).style.display="none"}catch(e){};
  try{document.getElementById(nss).className=""}catch(e){};
  }
 }  
}
//view note information
function viewBulletin(bid){
  href="/yyii/factoryinfo/public/bulletinViewdetail_.jsp?bid="+bid
  w=window.open(href,"BulletinView","width=525,height=340,resizable=no,scrollbars=yes")
  w.moveTo(0,0);
  w.focus();
}


function logout(){
  form0.action = "logout.jsp?tmp=" + (new Date()).getTime();
  form0.submit(); 
}


function getString2(str){
  var rstr="";
  for( getString2_i=0; getString2_i<str.length; getString2_i++ ){
    if( str.charAt(getString2_i)!= " " )
    if( escape(str.charAt(getString2_i))!="%0D" )
    if( escape(str.charAt(getString2_i))!="%0A" )
    rstr = rstr+str.charAt(getString2_i);
  }
  return rstr;
}

function gogogo(){
  var objHttp = new ActiveXObject("Microsoft.XMLHTTP");
  objHttp.open ("POST","hasSession.jsp?tmp="+(new Date).getTime(),false);
  objHttp.send();
  var retVal = getString2(objHttp.responseText);
  if(retVal=="yes"){
    window.open('system/main.jsp',''+new Date().getTime(),'resizable=yes,scrollbars=yes,left=0,top=0,width=' + (screen.availWidth-10) + ',height=' + (screen.availHeight-30));
  }else{
    window.location.reload();
  }
}

function openByUser(url){
	
  document.form1.action = url;
  document.form1.submit();
}

function doOpen(url,width,height){
	if(!url){
		window.status="no found URL";
		return;
	}
	var w;
	var h;
	try{
	w = parseInt(width);
	h = parseInt(height);
	}catch(error){}
	if(!w){
	w = window.screen.availWidth-10;
	}
	if(!h){
	h = window.screen.availHeight-150;
	}
	var feature = 'width='+w+',height=' + h + ',menubar,status,toolbar,location,resizable,top=0,left=0,scrollbars';
	window.open(url, '' ,feature);
 }
 
  function onGo(){
   // window.open("index.jsp");
		setTimeout('loginReload()',10000);
 }
 
 function loginReload(){
		window.location.reload();
	}

