var nameABC = "id"
var orderHeight = 330
var orderWidth = 1000
function GetQueryString(){ // ?id=99dd&name=liu 
	var f;
	var reg=new RegExp("(^|&)"+nameABC+"=([^&]*)(&|$)"); // /(^|&)id=([^&]*)(&|$)/
	var r=window.location.search.substr(1).match(reg); //alert(r[2]);
	if(r!=null)return unescape(r[2]);// window.location.search ?id=99dd&name=liu // window.location.search.substr(1) id=99dd&name=liu // r id=99dd&,,99dd,& //r[2] 99dd
	return null;
}

function getCookie(){
  var strcookie=document.cookie;
  var arrcookie=strcookie.split("; "); //rtime=2,ltime=1262741119171,cnzz_a1648400=18,sin1648400,AJSTAT_ok_pages=19,AJSTAT_ok_times=2,id=99dd 
  for(var i=0;i<arrcookie.length;i++){
		var arr=arrcookie[i].split("=");
		if(arr[0]==nameABC)return arr[1];
  }
  return "";
}

function Response(){
	document.write(getCookie())
}

function setCookie(sValue) {
	var expireHours = 24
	var cookieString = nameABC + "=" + escape(sValue);
	if (expireHours>0) {
		var date = new Date();
		date.setTime(date.getTime + expireHours * 3600 * 1000);//时间单位=毫秒
		cookieString = cookieString + "; expire=" + date.toGMTString();// date.toGMTString()转为GMT时间
	}
	document.cookie = cookieString;
}
function ZDmethod(a,b,c,dmy){
	var ZD  = document.getElementById(a);
	var ZD1 = document.getElementById(b);
	var ZD2 = document.getElementById(c);
	ZD2.innerHTML=ZD1.innerHTML
	function Marquee(){
		if(dmy == "left"){
			if(ZD2.offsetWidth-ZD.scrollLeft<=0){ZD.scrollLeft-=ZD1.offsetWidth;}else{ZD.scrollLeft++;}
		}else if(dmy == "top"){
			if(ZD2.offsetHeight-ZD.scrollTop<=0){ZD.scrollTop-=ZD1.offsetHeight;}else{ZD.scrollTop++;}
		}
	}
	var speed=30;
	var MyMar=setInterval(Marquee,speed)
	ZD.onmouseover=function(){clearInterval(MyMar)}
	ZD.onmouseout=function(){MyMar=setInterval(Marquee,speed)}
}

function iflash(pics,links,texts,focus_width,focus_height,text_height){
	var swf_height = focus_height+text_height;
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+ focus_width +'" height="'+ swf_height +'">');
	document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="flash/focus.swf"> <param name="quality" value="high"><param name="bgcolor" value="#F9F3DD">');
	document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
	document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
	document.write('<embed src="flash/focus.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#F9F3DD" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}
