/*********************************************************************
廣州眾企原創程序
本文件所有JS功能均由Yooken Chau開發
**********************************************************************/
var dom = document.getElementById ? true:false;
var nn4 = document.layers ? true:false;
var ie4 = document.all ? true:false;
var OverPcWin=1,cur_sb="sb1",visits=[],save_hist=1,ksAjax=null;
function set_count(){$('gotopage').src="cnzzcount.html"}
var cur_bct=["cb1","cb4","cb7","cb10","cb13","cb16",]
var cur_bc,cur_bt;
if (top.location != self.location)top.location=self.location;
window.onload=function(){/*set_stopb();hidew();*/var h=location.href;}
function set_cb(o,t){cur_bc=cur_bct[t-1];if(o.id == cur_bc)return;if(o.id.substring(0,2)!="cb") return;var no=parseInt(o.id.substring(2));var off=parseInt(cur_bc.substring(2));$("cb_"+no).style.display="block";$("cb_"+off).style.display="none";$(cur_bc).className="";o.className="cur_cb";cur_bct[t-1]=o.id}
function loadImgSize(obj){var w=1000;if(obj.width>w)obj.width=w}
function bbimg(o){/*var e = window.event ? window.event : e;alert(e.keyCode);if(e.keyCode!=9)return;*/var width=parseInt(o.width);var height=parseInt(o.height);var zoom=width+event.wheelDelta/5;if (zoom>100) {o.width=zoom;o.height=(zoom/width)*height}; return false;}
function loaderror(o){o.src=sitePath+"images/no_sPic.gif"}

function resize(){
	window.moveTo(0,0);window.focus();window.resizeTo(screen.availWidth,screen.availHeight);window.outerWidth=screen.availWidth;window.outerHeight=screen.availHeight;
}
function showJh(obj){var myJhData=["http://www.cooip.com/goto.asp?id=4232cn","http://www.uu108.com/c.php?mid=589","http://ads-count.420.cn/"];
var jhh=getCookieY("4232jhcookie");var jht=myJhData.length;var jhn="";if(jhh)jhn=jhh.split(",");var temp;for(i=0;i<jht;i++){if(i==0){temp = myJhData[i];}else{temp = temp + '|' + myJhData[i];}}temp='|'+temp+'|';for(x=0;x<jhn.length;x++)temp = temp.replace("|"+jhn[x]+"|",'|');temp = temp.substring(1,temp.length-1);var ran = Math.floor(Math.random()*temp.split('|').length);var sgoto = temp.split('|')[ran];if(sgoto!=""){if(sgoto!="/ttopssttopss.htm"){if(!jhh)schj=sgoto;else schj=jhh+","+sgoto;setCookieY("4232jhcookie",schj,{duration:1/2});}href=obj.href;setTimeout('jhfungoto(href)',1000);obj.href=sgoto;obj.target="_blank";}}
function jhfungoto(h){window.focus();top.location.href=h;}

function replaceAll(str, strFrom, strTo){return str.replace(new RegExp(strFrom, "g"), strTo);}
function checkTagA(e){s=e.target||e.srcElement;if(s.tagName!="A"){s=s.parentNode}return s}
function postSearch(o){if(o.keyword.value=="")return false; o.action=sitePath+"search.asp";}

function stat(){
var turl=location.pathname;turls=turl.split("/");tfile=turls[turls.length-1];tfile=tfile.substring(0,tfile.indexOf("."));if(tfile.indexOf("-")>0)tfile=tfile.substring(0,tfile.indexOf("-"));
var ev=arguments[0]||window.event;var s=checkTagA(ev);
try{var thref=s.href.split("/");threfs=thref[thref.length-1];threfs=threfs.substring(0,threfs.indexOf("."));if(threfs.indexOf("-")>0)threfs=threfs.substring(0,threfs.indexOf("-"));
if(s.tagName=="A" && threfs!=tfile&& s.href.indexOf("http://"+location.host) == 0&&!(threfs.charCodeAt(threfs.length-1)>=48&&threfs.charCodeAt(threfs.length-1)<=57)){if($('gotopage'))$('gotopage').src = sitePath+"goUrlCount.asp?u="+threfs;}}catch(e){}return true;}
document.onclick=stat;
function gotodoscookies(code,ck,n){if (getCookieY(ck)==null){setCookieY(ck,1,{duration:1});}else if (getCookieY(ck)<n-1){setCookieY(ck,parseInt(getCookieY(ck))+1,{duration:1})}else if(getCookieY(ck)==n-1||getCookieY(ck)>n-1) {tc=code.split("$$");var n=Math.floor(Math.random()*tc.length);document.writeln(tc[n]);setCookieY(ck,0,{duration:1})}}
function gotodocookies(code,ck,n){if (getCookieY(ck)==null){setCookieY(ck,1,{duration:1});}else if (getCookieY(ck)<n-1){setCookieY(ck,parseInt(getCookieY(ck))+1,{duration:1})}else if(getCookieY(ck)==n-1) {document.writeln(code);setCookieY(ck,n,{duration:1})}}

