﻿function getObject(objectId) {
    if(document.getElementById && document.getElementById(objectId)) {
	// W3C DOM
	return document.getElementById(objectId);
    } else if (document.all && document.all(objectId)) {
	// MSIE 4 DOM
	return document.all(objectId);
    } else if (document.layers && document.layers[objectId]) {
	// NN 4 DOM.. note: this won't find nested layers
	return document.layers[objectId];
    } else {
	return false;
    }
} // getObject
function showcd(s,n,count){

		for(var i=1;i<=count;i++){
		if (i==n){			
			getObject(s+"_"+i).className="active";
			getObject(s+"_c_"+i).style.display='block';
			}
		else {
			getObject(s+"_"+i).className="item";
			getObject(s+"_c_"+i).style.display='none';
			}
		}


}
function goUrl(obj){
if(obj.target=='_blank')window.open(obj.value);
else location.href=obj.value;
}

function gbgg()
{
	width=490;
	height=420;
	xposition = 0;
	yposition = 0;
	if ((parseInt(navigator.appVersion) >= 4 ))
	{
		xposition = (screen.width - width) / 2;
		yposition = (screen.height - height) / 2;
	} 
	theproperty= "width=" + width + ", height=" + height + ", location=0,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,hotkeys=0,screenx=" + xposition + "," + "screeny=" + yposition + "," + "left=" + xposition + "," + "top=" + yposition;
	nw=window.open("http://www.sxgaoping.gov.cn/","wzdh",theproperty);
}	




window.onerror = function(){
return true;
}

if (!window._sT){
	window._sT = window.setTimeout;
	window.setTimeout = function(fCallback, nDelay, oObject){
		if (typeof fCallback == 'function'){
			if (!oObject){oObject = window;}
			var argu = Array.prototype.slice.call(arguments, 3);
			var newFunc = (function(){ fCallback.apply(oObject, argu); });
			return window._sT(newFunc, nDelay);
		}
			return window._sT(fCallback, nDelay);
	};
}

var fodTime = 0;
var proFlog = 0;
var proTime = 0;

function $(o){ 
	return (typeof o == "object")?o:document.getElementById(o);
}

function getNames(obj,name,tij){
	var plist = $(obj).getElementsByTagName(tij);
	var rlist = new Array();
	for(i=0;i<plist.length;i++){
		if(plist[i].getAttribute("name") == name)
		{
			rlist[rlist.length] = plist[i];
		}
	}
	return rlist;
}

function cplay(){
	var o,n,t,na,c1,c2;
	o = $(arguments[0]);
	number=arguments[1];
	t=arguments[2];
	n=arguments[3];
	c1=arguments[4];
	c2=arguments[5];
	var f=getNames(o,n,t);
	for(i=0;i<f.length;i++){
		if(i == number){
			    f[i].className = c1;
			}
			else
			{
				f[i].className = c2;
		}
	}
}

function fod(){
	var o1,o2,t1,t2,n1,n2,c1,c2,c3,c4,number;
	o1=$(arguments[0]);
	o2=$(arguments[1]);
	number=arguments[2];
	t1=arguments[3];
	n1=arguments[4];
	t2=arguments[5];
	n2=arguments[6];
	c1=arguments[7];
	c2=arguments[8];
	c3=arguments[9];
	c4=arguments[10];
	cplay(o1,number,t1,n1,c1,c2);
	cplay(o2,number,t2,n2,c3,c4);
}

function _fod(o1,o2,t0,t1,n1,t2,n2,c1,c2,c3,c4){
	return function(){
		fod(o1,o2,t0,t1,n1,t2,n2,c1,c2,c3,c4)
	}
}

function formatArea(){
	var o1=$(arguments[0]);
	var o2=$(arguments[0]+"Info");
	var t1=arguments[1];
	var n1=arguments[2];
	var t2=arguments[3];
	var n2=arguments[4];
	var c1,c2,c3,c4;
	if(arguments.length>5){
		c1=arguments[5];c2=arguments[6];c3=arguments[7];c4=arguments[8];
		}
		else
		{
			c1="over";c2="";c3="dis";c4="undis"
		}
	var f=getNames(o1,n1,t1);
	for(i=0;i<f.length;i++){
		f[i].value = i;f[i].onmouseover = function(){
		    clearTimeout(fodTime);fodTime=0;fodTime = setTimeout(_fod(o1,o2,this.value,t1,n1,t2,n2,c1,c2,c3,c4),100);
		}; 
		f[i].onmouseout=function(){
			clearTimeout(fodTime);fodTime=0;
		}
	}
}
function g(o){return document.getElementById(o);} 
function HoverLi(n){ 
for(var i=1;i<=8;i++){g('tb_'+i).className='normaltab';g('tbc_0'+i).className='undis';}g('tbc_0'+n).className='dis';g('tb_'+n).className='hovertab'; 
} 
