﻿var xmlHttp;function createXMLHttpRequest(){if(window.ActiveXObject){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
else if(window.XMLHttpRequest){xmlHttp=new XMLHttpRequest();}}
function startRequest(url)
{createXMLHttpRequest();xmlHttp.onreadystatechange=handleStateChange;xmlHttp.open("post",url,true);xmlHttp.send(null);}
var userAgent=navigator.userAgent.toLowerCase();var is_opera=userAgent.indexOf('opera')!=-1&&opera.version();var is_moz=(navigator.product=='Gecko')&&userAgent.substr(userAgent.indexOf('firefox')+8,3);var is_ie=(userAgent.indexOf('msie')!=-1&&!is_opera)&&userAgent.substr(userAgent.indexOf('msie')+5,3);function getQueryString(key)
{var locString=location.search;var reg=new RegExp("(\\?|\\&)"+key+"=([^\\&]*)(\\&?)","i").exec(locString);if(reg)
{return RegExp.$2;}
else
return"";}
function centerwh()
{
	var obj = CenterObj;
    var h1 = document.body.clientHeight;
    var h2 = document.documentElement.clientHeight;
    var isXhtml = (h2<=h1&&h2!=0)?true:false;
    var body = isXhtml?document.documentElement:document.body;
   
    var wh={left:0,top:0};
    var vwh={w:0,h:0};
    vwh.w=window.ActiveXObject?parseInt(body.clientWidth):parseInt(window.innerWidth);
    vwh.h=window.ActiveXObject?parseInt(body.clientHeight):parseInt(window.innerHeight);
    wh.left=(vwh.w/2)-parseInt(obj.offsetWidth)/2;
    wh.top= body.scrollTop + (vwh.h / 2 ) - parseInt(obj.offsetHeight) / 2;
    obj.style.top = wh.top + "px";
    obj.style.left = wh.left + "px";
}
function OpenMask()
{SDisp(0);var divPageMask=$("divPageMask");if(divPageMask)
{$("divPageMask").style.display="block";}
else
{obj=document.createElement("div");obj.id="divPageMask";obj.style.zIndex=20;document.body.appendChild(obj);}
ResizeMask();window.onResize=ResizeMask;}
function CloseMask()
{SDisp(1);var divPageMask=$("divPageMask");divPageMask.style.width="0px";divPageMask.style.height="0px";window.onResize=null;}
function ResizeMask()
{var divPageMask=$("divPageMask");divPageMask.style.width=document.documentElement.scrollWidth+"px";divPageMask.style.height=document.documentElement.scrollHeight>document.documentElement.clientHeight?document.documentElement.scrollHeight+"px":document.documentElement.clientHeight+"px";}
function SDisp(val)
{var dispalyType;var dType=["hidden","visible"];var obj=document.getElementsByTagName("select");for(i=0;i<obj.length;i++)
{if(obj[i].id!="drpQuestionClass")
{obj[i].style.visibility=dType[val];}}}
function roundFun(numberRound,roundDigit)
{var digit;digit=1;digit=Math.pow(10,roundDigit)
return(Math.round(numberRound*digit)/digit);}
function CreateActiveForm1()
{var activeForm="<h2 onclick=\"document.getElementById('divActiveForm').style.display='none'\" style=\"text-align:right;\">Close</h2><p><a href=\"/active/active0701.html\" target=\"_blank\"><img src=\"../guanggao/index_active.gif\" width=\"120\" height=\"450\" /></a></p>";var obj=document.getElementById("divActiveForm");if(!obj)
{obj=document.createElement("div");obj.id="divActiveForm";obj.className="floatGg";obj.style.position="absolute";obj.style.display="none";obj.innerHTML=activeForm;obj.style.zIndex=10000;document.body.appendChild(obj);}
IntervalDiv=setInterval("centerwh()",50);obj.style.display="";CenterObj=obj;}
function CreateActiveForm()
{
/*
	var activeForm = "<div style=\"background-color:#FFFFCC;padding:15px;border:2px solid #999;font:9pt/150% Georgia,Arial,Helvetica,sans-serif;color:#000;\"><div style=\"text-align:right;font-weight:bold;\"><a href=\"javascript:void(0);\" onclick=\"clearInterval(IntervalDiv);document.getElementById('divActiveForm').style.display='none';\">Close</a></div><div style=\"text-align:center;\"><h1>Notice</h1></div><div><p style=\"width:400px;\">&nbsp;&nbsp;Dear Sir/ Madam,  thanks so much for your great support in the past year. January 21st to 30th will be our traditional Lunar New Year Holiday. We are supposed to come back to work on January 31st. During the days we will not be available, but you can order directly. Thus,  we will offer you 15% bonus according to your amounts. And you can use the bonus to purchase on our sites! :)<br />Thanks and enjoy yourself & Happy Lunar New Year!^^</p><div></div>";
	var obj = document.getElementById("divActiveForm");
	if(!obj)
	{
		obj = document.createElement("div");
		obj.id = "divActiveForm";
		obj.style.position = "absolute";
		obj.style.display = "none";
		obj.innerHTML = activeForm;
		obj.style.zIndex = 10000;
		document.body.appendChild(obj);
	}
	IntervalDiv = setInterval("centerwh()", 50);
	obj.style.display = "";
	CenterObj = obj;
*/
}
var IntervalDiv=null;var CenterObj=null;
