function winopen(url,urlname){
	window.open(url,urlname,"width="+(window.screen.width-15)+",height="+(window.screen.height-170)+",left=0,top=0,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,status=yes");
	//window.open(url,urlname,"width="+(window.screen.width-250)+",height="+(window.screen.height-250)+",left=50,top=50,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,status=yes");
	window.focus();
}
function externallinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i]; 
   if (anchor.getAttribute("href") && 
       anchor.getAttribute("rel") == "new") 
     anchor.target = "_blank"; 
 } 
} 
window.onload = externallinks;
//以上设置新窗口打开网站

function winopen(url,urlname){
	window.open(url,urlname,"width="+(window.screen.width-15)+",height="+(window.screen.height-170)+",left=0,top=0,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,status=yes");
	window.focus();
}
//winopen("http://blog.domain.sh.cn/index.php","blogshcn");

function setTab0dSyn(i,idbef,idall,tabtabbef)
{
	var waitInterval;	
	var MouseDelayTime=150;
	_gObj(idbef+i).onmouseout=function(aEvent)
	{					
		  clearTimeout(waitInterval);
	}
	clearTimeout(waitInterval);
	var str="setTab0dSyn1("+i+",'"+idbef+"',"+idall+",'"+tabtabbef+"')";
	waitInterval=setTimeout(str,MouseDelayTime);
}

function setTab0dSyn1(i,idbef,idall,tabtabbef)
{
	changDivClass(idbef,idall,i)
	selectTab0dSyn(tabtabbef,idall,i);
}
function selectTab0dSyn(div_id,allnum,now){
	for(var i= 1; i<= allnum;i++)
	{
		if(i==now){
			_gObj(div_id+i).style.display="block";
		}else		{
			_gObj(div_id+i).style.display="none";
		}
	}
}	
function _gObj(id)
{
	return document.getElementById(id);
}
function changDivClass(div_id,all,now)
{
	for(var i= 1; i<= all;i++)
	{
		if(i==now){
			_gObj(div_id+i).className = "thispagebg_"+i+" thispage";
		}else{
			_gObj(div_id+i).className = "";
		}
	}
}

//google search
function ggs(searchkeyword){
//	window.open("/search/?q="+searchkeyword+"&amp;sa=+Google+%E6%90%9C%E7%B4%A2+&amp;client=pub-8013033803587454&amp;forid=1&amp;ie=UTF-8&amp;oe=UTF-8&amp;cof=GALT%3A%23008000%3BGL%3A1%3BDIV%3A%23336699%3BVLC%3A663399%3BAH%3Acenter%3BBGC%3AFFFFFF%3BLBGC%3A336699%3BALC%3A0000FF%3BLC%3A0000FF%3BT%3A000000%3BGFNT%3A0000FF%3BGIMP%3A0000FF%3BFORID%3A11&amp;hl=zh-cn","","");	
	window.open("/search/?q="+searchkeyword+"&sa=+Google+%E6%90%9C%E7%B4%A2+&client=pub-8013033803587454&forid=1&ie=UTF-8&oe=UTF-8&cof=GALT%3A%23008000%3BGL%3A1%3BDIV%3A%23336699%3BVLC%3A663399%3BAH%3Acenter%3BBGC%3AFFFFFF%3BLBGC%3A336699%3BALC%3A0000FF%3BLC%3A0000FF%3BT%3A000000%3BGFNT%3A0000FF%3BGIMP%3A0000FF%3BFORID%3A11&hl=zh-cn","","");	
}
//google search end