

//layer
function hideMe(){
floatingLayer.style.visibility="hidden";
}


function currDate()
{     
    cDate = new Date();
    document.getElementById('DATE_LOCAL').value = cDate;    
}


//show/hide menu in privacy, faq, terms, etc
var old_menu = '';
function menuclick( submenu)
{
	if( old_menu != submenu ) {
		if( old_menu !='' ) {
			old_menu.style.display = 'none';
		}
		submenu.style.display = 'block';
		old_menu = submenu;
	} else {
		submenu.style.display = 'none';
		old_menu = '';
	}
}

//validate login when submitted
function Validate(theForm){
	if (theForm.username.value == ''){
		alert('请键入电子邮件地址');
		theForm.username.focus();
		return false;
	}//end if
	url = theForm.username.value;
	a = url.lastIndexOf('@');
	b = url.lastIndexOf('.');
	o = 0;
	if (a > b) {o++};
	if (a == -1) {o++};
	if (b == -1) {o++};
	if (o == 0) {
		theForm.username.value=url;
	}else{
		alert('请键入正确电子邮件地址');
		theForm.username.focus();
		return false;
	}//end ifelse
		

	if (theForm.userPassword.value == ''){
		alert("请键入正确密码");
		theForm.userPassword.focus();
		return (false);
	}//end if	
	return true;
}//end function

//validate login when submitted
function Submit(theForm){
	if(Validate(theForm)){
		document.formLogin.submit();
	}//end if
}//end function

//show flash without frame
function loadFlash(flashName, flashWidth, flashHeight){
	var flashTag="";

	flashTag ="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ";
	flashTag+="codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" ";
	flashTag+="width=\""+flashWidth+"\" ";
	flashTag+="height=\""+flashHeight+"\">";
	flashTag+="<param name=\"movie\" value=\""+flashName+"\">";
	flashTag+="<param name=\"quality\" value=\"high\">";
	flashTag+="<param name=\"menu\" value=\"false\">";
	flashTag+="<PARAM NAME=wmode VALUE=transparent>";
	flashTag+="<embed src=\""+flashName+"\" width=\""+flashWidth+"\" height=\""+flashHeight+"\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\">";
	flashTag+="</embed>";
	flashTag+="</object>";

	document.write(flashTag);
}

<!-- Hide JavaScript from Java-Impaired Browsers
function MenuRollOver(oTd) {if (!oTd.contains(event.fromElement)) {oTd.bgColor="#FFee66";}{oTd.Color="#FFFFFF";}}
function MenuRollOut(oTd) {if (!oTd.contains(event.toElement)) {oTd.bgColor="#FFFFFF";}}
// End Hiding -->

//date
function makeArray(n) {
this.length = n
return this
}
monthNames = new makeArray(12)
monthNames[1] = "1"
monthNames[2] = "2"
monthNames[3] = "3"
monthNames[4] = "4"
monthNames[5] = "5"
monthNames[6] = "6"
monthNames[7] = "7"
monthNames[8] = "8"
monthNames[9] = "9"
monthNames[10] = "10"
monthNames[11] = "11"
monthNames[12] = "12"
function dateString(oneDate) {
var theMonth = monthNames[oneDate.getMonth() + 1]
var theYear = oneDate.getFullYear()
return theYear + "?" + theMonth + "?" + oneDate.getDate() + "? " 
}
//

function lib_bwcheck(){ 
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6||this.ie7
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie7|| this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=new lib_bwcheck()

var numScrollPages = 3  
var transitionOut = 1;      
var transitionIn = 2;       
var slideAcceleration = 0.2;  
var transitionOnload = 1   

var px = bw.ns4||window.opera?"":"px";

if(document.layers){ 
	scrX= innerWidth; scrY= innerHeight;
	onresize= function(){if(scrX!= innerWidth || scrY!= innerHeight){history.go(0)} }
}



//-->

//forbid right click
//function noRightClick(){
<!--
//	var message="";
/*
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
*/
// --> 
//}

//function hidestatus(){
//	window.status=''
//	return true
//}

//if (document.layers)
//document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

//document.onmouseover=hidestatus
//document.onmouseout=hidestatus



function dayUpdate()
{
var monthSelect, yearSelect, HHNum, indx;

    for(indx=1;indx<=5;indx++)
    {
    HHNum = 'KIDS'+indx+'DOB';
        if(eval('document.myForm.'+HHNum+'_month')!= '')
        {
        monthSelect = eval('document.myForm.'+HHNum+'_month').selectedIndex;
        yearSelect = eval('document.myForm.'+HHNum+'_year').selectedIndex;

        if(monthSelect > 0 && yearSelect > 0)
        eval('document.myForm.'+HHNum+'_day').selectedIndex = 1;
        else
        eval('document.myForm.'+HHNum+'_day').selectedIndex = 0;
        }
    }
}


