// JavaScript Document

var xmlHttp = false;
function CreateXMLHttp() {
try {
	xmlHttp = new XMLHttpRequest();
} catch (trymicrosoft) {
try {
	xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (othermicrosoft) {
try {
	xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (failed) {
	xmlHttp = false;
}
}
}
//if (!xmlHttp)alert("Error initializing XMLHttpRequest!");
}


function HandleRequest(txtDivID) {
	if (xmlHttp.readyState == 4) {
		if (xmlHttp.status == 200) {
			var response = xmlHttp.responseText;
			document.getElementById(txtDivID).innerHTML = response;
			}
		else if(xmlHttp.status == 404) {
			document.getElementById(txtDivID).innerHTML = "Requested URL is not found.";
		}
		else if (xmlHttp.status == 403) {
			document.getElementById(txtDivID).innerHTML = "Access denied.";
		}
		else{
			document.getElementById(txtDivID).innerHTML = "Status is " + xmlHttp.status;
		}
	}
}





function GetUrlParameter(para)
{
var retval="",s=location.search.replace("?","");
if(s=="")return "";s = s.split("&");
for(var i=0;i<s.length;i++)
if(s[i].toUpperCase().indexOf(para.toUpperCase() + "=")==0)
retval+=((retval==""?"":", ")+s[i].substr(s[i].indexOf("=")+1,s[i].length));
return retval;
}


function GetCookies(sMainName,sSubName)
{ 
var sCookieName = sMainName + "=";
var sSubCookieName = (sSubName)?sSubName + "=":null;
var sCookie;
var sWholeCookie = document.cookie;

var nValueBegin = sWholeCookie.indexOf(sCookieName);
if(nValueBegin!=-1)
{
var nValueEnd = sWholeCookie.indexOf(";",nValueBegin);
if(nValueEnd == -1)
nValueEnd = sWholeCookie.length;

var sValue = sWholeCookie.substring(nValueBegin + sCookieName.length,nValueEnd);

if(sSubCookieName)
{ 
var nSubValueBegin = sValue.indexOf(sSubCookieName);
if(nSubValueBegin!=-1)
{
var nSubValueEnd = sValue.indexOf("&",nSubValueBegin);
if(nSubValueEnd == -1)
nSubValueEnd = sValue.length;
var sSubValue = sValue.substring(nSubValueBegin + sSubCookieName.length,nSubValueEnd);
return unescape(sSubValue);
} 
} 
if(!sSubCookieName) 
return unescape(sValue); 
} 
return null; 
}


//no cookies aggregate
function GetUnitCookie(cookieUnitName){
	var allcookies = document.cookie;
	var cookie_pos = allcookies.indexOf(cookieUnitName);

	if (cookie_pos != -1){
		cookie_pos += cookieUnitName.length + 1;
		var cookie_end = allcookies.indexOf(";",cookie_pos);
		if (cookie_end == -1){
			cookie_end = allcookies.length;
		}

	var value = unescape(allcookies.substring(cookie_pos,cookie_end));
	}
	return value;
}



function IsDigit(){
	return ((event.keyCode >= 48) && (event.keyCode <= 57));
}



//for eng check
function OnlyEng(thisID){
	var inputObjStr,strlen,strExp,newObjStr,newObjStrRe;
	inputObjStr=thisID.value;
	newObjStr=thisID.value;
	newObjStrRe=newObjStr.replace(/'/g,"")
	newObjStrRe=newObjStrRe.replace(/"/g,"")
	newObjStrRe=newObjStrRe.replace(/&/g,"")
	newObjStrRe=newObjStrRe.replace(/</g,"")
	newObjStrRe=newObjStrRe.replace(/>/g,"")
	newObjStrRe=newObjStrRe.replace(/\//g,"")
	newObjStrRe=newObjStrRe.replace(/\\/g,"")
	newObjStrRe=newObjStrRe.replace(/\r\n/g,"")

	for (i=0; i < newObjStrRe.length; i++){
		var CheckChar = newObjStrRe.charAt(i);
		var NewChar = CheckChar;
		var thisStrLen = CheckChar.length;
		strExp="/[\\x00-\\xff]{"+thisStrLen+"}/.test('"+CheckChar+"')";
		if (!eval(strExp)) {
		NewChar ="";
		}
	newObjStr = newObjStr.replace(CheckChar,NewChar);
	}

	if (inputObjStr!=newObjStr) {
		thisID.value = newObjStr;
	}
}


function ReplaceSpecialPunctuation(sChar) {
	var nChar=sChar;
	nChar=nChar.replace(/ /g,"&nbsp;")
	nChar=nChar.replace(/'/g,"")
	nChar=nChar.replace(/"/g,"")
	nChar=nChar.replace(/&/g,"")
	nChar=nChar.replace(/</g,"")
	nChar=nChar.replace(/>/g,"")
	nChar=nChar.replace(/\//g,"")
	nChar=nChar.replace(/\\/g,"")
	nChar=nChar.replace(/\r\n/g,"")
	return nChar;
}


function SchNav(Idname,sType){
	var i ;
	for (i=1;i<=4;i++)
	{
		var navId = "nav"+i;
		if (navId === Idname )
		{
			document.getElementById(Idname).className = "btnCurrent";
		}
		else
		{
			document.getElementById(navId).className = "btn";
		}
	}
	document.getElementById("sType").value = sType;
}




//search check
function ReSerarchList()
{
if (document.formSearch.q.value == "" ){
	alert ("Please input a search term.");
	document.formSearch.q.focus();
	return false;
	}
return true;
}



function OpenWindow(url,name,iWidth,iHeight)
{
var url;
var name;
var iWidth;
var iHeight;
var iTop = (window.screen.availHeight-30-iHeight)/2;
var iLeft = (window.screen.availWidth-10-iWidth)/2;
window.open(url,name,'height='+iHeight+',,innerHeight='+iHeight+',width='+iWidth+',innerWidth='+iWidth+',top='+iTop+',left='+iLeft+',toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no');
}



function ImgZoom(thisImgURL,thisImgType,thisW,thisH)
{
if ((thisW!=0)&(thisW!="")&(thisH!=0)&(thisH!="")) {
var whAdd=100
var w = Number(thisW)+whAdd
var h = Number(thisH)+whAdd
}
else {
var w = (window.screen.width)*0.8
var h = (window.screen.height)*0.8
}
window.open("/app/imageZoom.html?thisImgURL="+thisImgURL+"&thisImgType="+thisImgType,"","toolbar=no,location=no,status=no,menubar=no,resizable=no,width="+w+",height="+h)
}


function GotoGetPassword(){
	window.open("/app/getPassword.asp");
//	window.location="/app/getPassword.asp";
}



function GotoShoppingCart(){
var w = (window.screen.width)*0.8
var h = (window.screen.height)*0.8
window.location.href="/app/order.asp"
}


function AddToShoppingCart(ProID,AddMethod){
//var strOrderExpand="";
if (AddMethod=="Single"){
	var oSize=document.getElementById("oSize");
	var oColor=document.getElementById("oColor");
	var oQty=document.getElementById("oQty");

	if ((oSize!="")&&(oSize!=null)){
		document.formOrderAdd.oSize.value=oSize.value;
	}
	if ((oColor!="")&&(oColor!=null)){
		document.formOrderAdd.oColor.value=oColor.value;
	}
	if ((oQty!="")&&(oQty!=null)){
		document.formOrderAdd.oQty.value=oQty.value;
	}
	document.formOrderAdd.ProID.value=ProID;
}
document.formOrderAdd.AddMethod.value=AddMethod;
document.formOrderAdd.Action.value="Add";
document.formOrderAdd.submit();
//window.location.href="/app/order.asp?ProID="+ProID+strOrderExpand+"&Action=Add"
}


function AddToFavorites(ProID,txtDivID){
	CreateXMLHttp();
	var url = "/inc/ajax_addToFavorites.asp?psid=" + escape(ProID);;
	xmlHttp.open("GET", url, false);
	xmlHttp.onreadystatechange = function(){HandleRequest(txtDivID)};
	xmlHttp.send(null);
	
	CommonHeaderFunMenu(0);
}



function InputCss(thisInputID,s) {
	if (s=="focus") {
		thisInputID.className="inputFocus";
	}
	else if (s=="error") {
		thisInputID.className="inputError";
	}
	else {
		thisInputID.className="inputNormal";
	}	
}


function InputCheckInnerHTML(txtDivID,s,str) {
	if (s=="ok"){
		document.getElementById(txtDivID).innerHTML="<img src=\"/images/icon/ico_t.gif\" hspace=\"5\" border=\"0\" align=\"absmiddle\" />";
	}
	else{
		document.getElementById(txtDivID).innerHTML="<img src=\"/images/icon/ico_f.gif\" hspace=\"5\" border=\"0\" align=\"absmiddle\" /><br />"+str;
	}
}



function ChooseEffect(thisDivID,s) {
	if (s=="focus") {
		document.getElementById(thisDivID).className="chooseEffectFocus";
	}
	else {
		document.getElementById(thisDivID).className="chooseEffect";
	}
}


function ParaAreaShowHide(mA,aA,iA){
	var m,a,iOn;
	iOn=iA+1;
	for (i=1;i<iOn;i++){
		m="mpi"+i;
		a="api"+i;
		if (m==mA){
			document.getElementById(m).className="btnCurrent";
			document.getElementById(a).style.display="";
		}
		else{
			document.getElementById(m).className="btnLink";
			document.getElementById(a).style.display="none";
		}
	}
}


function SerialAreaShowHide(iCurrent,iAll,aPrefix) {
	var a;
	for (i=1;i<iAll+1;i++){
		a=aPrefix+i;
		if (i==iCurrent){
			document.getElementById(a).style.display="";
		}
		else{
			document.getElementById(a).style.display="none";
		}
	}
}




function CommonHeaderFunMenu(thisProID){
	CreateXMLHttp();
	var url = "/inc/ajax_header_funMenu.asp?thisProID=" + escape(thisProID);
	xmlHttp.open("GET", url, true);
	xmlHttp.onreadystatechange = function(){HandleRequest("headerFunMenu")};
	xmlHttp.send(null);
}


function CommonSignIn() {
	CreateXMLHttp();
	var url = "/inc/ajax_inc_signin.asp";
	xmlHttp.open("GET", url, false);
	xmlHttp.onreadystatechange = function(){HandleRequest("areaMainLeftSignIn")};
	xmlHttp.send(null);
}


function PaginationAjax(txtDivID,thisURL,thisURLpara,thisIsBegin) {
	CreateXMLHttp();
	var url;
	if (thisIsBegin=="begin"){
		url = thisURL + "?" + thisURLpara + "&txtDivID_ajax=" + txtDivID + "&thisURL_ajax=" + thisURL;
	}
	else {
		url = thisURL + "?" + thisURLpara;
	}
	xmlHttp.open("GET", url, false);
//	xmlHttp.open("GET", url, true);
	xmlHttp.onreadystatechange = function(){HandleRequest(txtDivID)};
	xmlHttp.send(null);
}





//begin comment js for products detail
function ProSignleSubTotal(thisInputID,thisInputValueOri,ProPrice,thisSpanID,PriceCurrency)
{
	var thisInputValue;
	var thisSubTotalValue;
	var txt_thisSpan="";
	thisInputValue=thisInputID.value;
	if ((ProPrice!="")&&(ProPrice!=null)&&(ProPrice!=0)){
		thisSubTotalValue=thisInputValue*ProPrice;
		txt_thisSpan="&nbsp;&nbsp;&nbsp;<b>Sub Total: </b><b class=\"red px14 verdana\">"+PriceCurrency+thisSubTotalValue+"</b>"
		document.getElementById(thisSpanID).innerHTML = txt_thisSpan;
	}
	else if (thisInputValue==thisInputValueOri){
		document.getElementById(thisSpanID).innerHTML = txt_thisSpan;
	}
}

function ProCorrelativeProducts(thisProID){
	CreateXMLHttp();
	var url = "/inc/ajax_proCorrelative.asp?thisProID=" + escape(thisProID);
	xmlHttp.open("GET", url, true);
	xmlHttp.onreadystatechange = function(){HandleRequest("areaCorrelativeProducts")};
	xmlHttp.send(null);
}
//end



//beign js for sub dir menu
function MenuSubDirShowHide(menuIDcur,menuIDsub)
{
var menuIDc=document.getElementById(menuIDcur);
var menuIDs=document.getElementById(menuIDsub);
if(menuIDs.style.display=="none"){
	menuIDs.style.display="";
//	menuIDcur.className="";
	} else {
	menuIDs.style.display="none"; 
//	menuIDcur.className="";
	}
}



//begin js for proup
var millisec = 250;
var timeoutId;
var visiblePopup = null;

function PopupShowHide(popdivId)
{
	if(document.getElementById)
	{
		var obj = document.getElementById(popdivId);
		if(obj.style.visibility == "hidden" || obj.style.visibility == "")
		{
			obj.style.visibility = "visible";
    		PopupHide();
			visiblePopup=popdivId;
		}
		else
			PopupHide();
	}
	return false;
}

function HideDelay()
{
	PopupClear();
	timeoutId = setTimeout(function(){PopupHide()}, millisec);
}

function PopupHide()
{
	PopupClear();
	if(visiblePopup!=null)
	{
		var o = document.getElementById(visiblePopup);		
		visiblePopup=null;
		o.style.visibility = "hidden";
	}
	return false;
}

function PopupClear()
{
	if(typeof timeoutId != "undefined")
	{
		clearTimeout(timeoutId);
	}
}
//end for popup










<!--
GlideParams = {
	START_SPEED : 400, // px per second
	HIDE_DELAY_MS : 300,
	SHOW_DELAY_MS : 200, // pause before showing submenu
	ACCELERATION_OUT :  .00055, // px/second/millisecond
	ACCELERATION_BACK : .0009, // px/second/millisecond
	FRAME_PAUSE : 1,
	CLICK_HIDE : false,
	CLICK_SHOW : false,
	IMG_OVER_EXT : "MO"
};
//-->

GM_CREATOR="DHTMLKITCHEN";
GM_LICENSEE="Verisign";

ua=new function(){var u=navigator.userAgent,d=document;
this.ie=typeof d.all!="undefined";
this.ns4=typeof d.layers!="undefined";
this.dom=typeof d.getElementById!="undefined";
this.safari=/Safari/.test(u);
this.moz=/Gecko/.test(u)&&!this.safari;
this.mie=this.ie&&/Mac/.test(u);
this.win9x=/Win9/.test(u)||/Windows 9/.test(u);
this.o7=/Opera 7/.test(u);
this.supported=(typeof d.write!="undefined")&&(this.ie||this.ns4||this.dom);
this.px=this.dom&&d.compatMode!="BackCompat"||this.mie?"px":0;
this.dblThread=this.ie&&this.win9x||this.safari;};
if(GlideParams.CLICK_HIDE)document.onmousedown=function(e){var am=GlideMenus.activeMenu;
if(!am||contains(am.actuator,getTarget(e))||contains(am.el,getTarget(e)))return;
am.hideTree();
GlideMenus.activeMenu=null;};
function showMenu(e,id,dir,adjX,adjY){var menu=GlideMenu.getInstance(e,id,dir);
if(!menu.actuator)menu.actuator=menu.getActuator(e);
menu.over=true;
if(menu.parentMenu==null){var am=GlideMenus.activeMenu;
if(am&&am!=menu&&!am.closing()){clearTimeout(am.animTimer);
clearTimeout(am.animTimer2);
am.hideTree();}}window.clearTimeout(menu.hideTimer);
if(menu.closing())menu.glideBackEnd();
else clearTimeout(menu.showTimer);
if(GlideMenus.activeMenu&&GlideMenus.activeMenu==menu)return;
GlideMenus.activeMenu=menu;
clearTimeout(menu.showTimer);GlideMenu.positionFrame(menu,e,adjX,adjY);
menu.glideOutStart(true);};
function showSubMenu(e,parentMenuId,id,dir,adjX,adjY){var menu=GlideMenu.getInstance(e,id,dir);
if(!menu.actuator)menu.actuator=menu.getActuator(e);
clearTimeout(menu.hideTimer);
menu.over=true;
menu.parentMenu=GlideMenus[parentMenuId];
if(ua.ns4)adjX-=e.layerX;
GlideMenu.positionFrame(menu,e,adjX+menu.parentMenu.w(),adjY);
var activeMenu=menu.parentMenu.activeMenu;
if(activeMenu!=null&&activeMenu!=menu){if(!activeMenu.opening||!activeMenu.fullyOpen()){menu.showTimer=setTimeout(menu.GlideOutStartStr,GlideParams.SHOW_DELAY_MS);}else menu.parentMenu.activeMenu.menuInCue=menu;
return;}clearTimeout(menu.parentMenu.hideTimer);
if(menu.closing())menu.glideBackEnd();
else if(menu.fullyClosed())menu.showTimer=setTimeout(menu.GlideOutStartStr,GlideParams.SHOW_DELAY_MS);}
function hideSubMenu(id){var menu=GlideMenus[id];
clearTimeout(menu.showTimer);
if(menu.parentMenu!=null&&menu.parentMenu.activeMenu!=null&&menu.parentMenu.activeMenu.menuInCue!=null&&menu.parentMenu.activeMenu.menuInCue!=menu){menu.parentMenu.activeMenu.menuInCue.hide();}window.clearTimeout(menu.hideTimer);
menu.over=false;
if(menu.parentMenu&&(!menu.parentMenu.over||GlideParams.CLICK_HIDE))return;
menu.hideTimer=window.setTimeout(menu.hideStr,GlideParams.HIDE_DELAY_MS);}function headerMouseover(imgName_or_element){if(GlideMenus.activeMenu)GlideMenus.activeMenu.hideTree();
if(typeof imgName_or_element=="string"){var img=document.images[imgName_or_element];
img.lowSrc=img.src;
img.src=img.src.replace(Exps.EXT,GlideParams.IMG_OVER_EXT+"$1");}else{var el=imgName_or_element;
el.className+=" hover";}}function headerMouseout(imgName_or_element){if(typeof imgName_or_element=="string"){var img=document.images[imgName_or_element];
img.src=img.lowSrc;}else{var el=imgName_or_element;
removeClass(el,"hover");}}function actuatorMouseover(event,menuId,dir,adjX,adjY){if(adjX==null)adjX=0;
if(adjY==null)adjY=0;
if(GlideParams.CLICK_SHOW){var menu=GlideMenu.getInstance(event,menuId,dir);
menu.getActuator(event);
menu.hiliteHdr();
if(GlideMenus.activeMenu)if(GlideMenus.activeMenu.id!=menuId){hideMenu(GlideMenus.activeMenu.id);
showMenu(event,menuId,dir,adjX,adjY);}else
GlideMenus.activeMenu.glideOutStart();}else showMenu(event,menuId,dir,adjX,adjY);}function actuatorMouseout(event,menuId){if(GlideParams.CLICK_SHOW){var menu=GlideMenu.getInstance(event,menuId,"");
menu.getActuator(event);
menu.over=false;
if(menu.fullyClosed())menu.unhiliteHdr();}else hideMenu(menuId);}
function hideMenu(id){var menu=GlideMenus[id];
if(menu==null||menu.frame==null)return;
if(!menu.opening&&!menu.fullyOpen())return;
window.clearTimeout(menu.hideTimer);
window.clearTimeout(menu.showTimer);
if(!menu.opening){window.clearInterval(menu.animTimer);
window.clearInterval(menu.animTimer2);}if(menu.activeMenu)menu.activeMenu.hideTimer=window.setTimeout(menu.activeMenu.hideStr,1100);
menu.over=false;
if(menu.activeMenu)return;
if(GlideParams.CLICK_HIDE)return;
menu.hideTimer=window.setTimeout(menu.hideStr,GlideParams.HIDE_DELAY_MS);
clearTimeout(menu.showTimer);}GlideMenu=function(e,id,dir){if(!ua.supported)return;
var d=window.document;
this.actuator=(e==null)?null:this.getActuator(e);
this.id=id;
this.dir=dir;
var fID=id+"Frame";
this.frame=ua.dom?d.getElementById(fID):ua.ie?d.all[fID]:d.layers[fID];
if(ua.ns4&&!this.frame&&d.parentLayer)this.frame=d.parentLayer.d.layers[fID];
if(ua.ns4)this.frame.style=this.frame;
this.el=ua.dom?d.getElementById(id):ua.ns4?this.frame.layers[id]:d.all[id];
this.css=ua.ns4?this.el:this.el.style;
if(!ua.ns4&&!ua.mie){if(!ua.o7)this.css.height=this.css.width="auto";
this.frame.style.width=this.el.offsetWidth+"px";}if(this.dir.indexOf("e")>=0)this.startX=-this.w();
else if(this.dir.indexOf("w")>=0)this.startX=this.w();
if(this.dir.indexOf("n")>=0)this.startY=this.h();
else if(this.dir.indexOf("s")>=0)this.startY=-this.h();
var cId=id;
if(ua.ns4){this.frame.captureEvents(Event.MOUSEMOVE);
this.frame.onmousemove=function(e){GlideMenu.onmouseover(cId);var sub;
if((sub=GlideMenus[cId].activeMenu)==null)return;
if(e.y>sub.actuator.y+14||e.y<sub.actuator.y-1||e.pageX<this.x||e.pageX>this.x+this.clip.width){sub.over=false;
sub.hideTimer=setTimeout(sub.hideStr,GlideParams.HIDE_DELAY_MS);}};}else{this.el.onmouseover=function(){GlideMenu.onmouseover(e,cId);};	this.el.onmouseout=function(e){GlideMenu.onmouseout(e,cId);};}var ref="GlideMenus."+this.id;
this.GlideOutStartStr=ref+".glideOutStart(true)";
this.GlideOutStr=ref+".glideOut()";
this.GlideBackStr=ref+".glideBack()";
this.hideStr=ref+".hide()";
this.moveTo(this.startX,this.startY);
this.initAnimProps();GlideMenus[id]=this;};
GlideMenus={activeMenu:null};
GlideMenu.getInstance=function(e,id,dir){if(GlideMenus[id]==null)GlideMenus[id]=new GlideMenu(e,id,dir);
return GlideMenus[id];};
GlideMenu.onmouseover=function(e,cId){var menu=GlideMenus[cId];
var toEl=e?(window.event)?window.event.toElement:e.relatedTarget:null;
menu.over=true;
if(GlideParams.CLICK_HIDE){if(menu.activeMenu&&!menu.activeMenu.over){if(contains(menu.el,toEl))menu.activeMenu.hide();
else
if(!menu.activeMenu.hideTimer)hideSubMenu(menu.activeMenu.id);}return;}clearTimeout(menu.hideTimer);
if(!menu.opening&&!menu.fullyOpen()){clearInterval(menu.animTimer);
clearInterval(menu.animTimer2);
menu.glideOutStart(false);}if(menu.parentMenu){menu.parentMenu.over=false;
clearTimeout(menu.parentMenu.hideTimer);}};
GlideMenu.onmouseout=function(e,cId){var toEl=(window.event)?window.event.toElement:e.relatedTarget;
if(contains(GlideMenus[cId].el,toEl))return;
hideMenu(cId);};
GlideMenu.positionFrame=function(menu,e,adjX,adjY){if(ua.ns4)return;
if(typeof adjX=="number"){if(ua.mie&&menu.actuator){var actuatorPaddingL=parseInt(menu.actuator.currentStyle.paddingLeft);
if(!isNaN(actuatorPaddingL))adjX-=actuatorPaddingL;}var left=getPageOffset(menu.actuator,"offsetLeft");
menu.frame.style.left=Math.round(left+adjX)+ua.px;}if(typeof adjY=="number"){var top=(ua.ns4?e.y-menu.actuator.y:getPageOffset(menu.actuator,"offsetTop"));
var elHeight=menu.actuator.offsetHeight;
menu.frame.style.top=Math.round(top+adjY+elHeight)+ua.px;}};
GlideMenu.prototype={el:null,css:null,frame:null,actuator:null,imgSrc:null,hiSrc:null,parentMenu:null,activeMenu:null,showTimer:0,hideTimer:0,animTimer:0,animTimer2:0,startX:0,endX:0,startY:0,endY:0,dir:"s",GlideOutStartStr:"",GlideOutStr:"",GlideBackStr:"",hideStr:"",opening:false,over:false,GlideDist:0,rx:0,ry:0,del:0,glideOutStart:function(bActivate){if(bActivate)this.onactivate();
if(this.fullyOpen())return;
this.hiliteHdr();
if(this.opening)clearTimeout(this.hideTimer);
this.opening=true;
if(this.parentMenu)this.parentMenu.activeMenu=this;
this.GlideStartOffset=this.GlideDist-Math.sqrt(this.x*this.x+this.y*this.y);
this.frame.style.visibility="visible";
if(this.parentMenu==null)GlideMenus.activeMenu=this;
window.clearInterval(this.animTimer);
window.clearInterval(this.animTimer2);
this.startTime=new Date().getTime();
this.animTimer=window.setInterval(this.GlideOutStr,this.del);
if(ua.dblThread)this.animTimer2=window.setInterval(this.GlideOutStr,this.del);},glideBackStart:function(){this.ondeactivate();
this.unhiliteHdr();
if(this.fullyClosed())return;
this.opening=false;if(this.parentMenu&&this.parentMenu.activeMenu==this)this.parentMenu.activeMenu=null;
this.GlideBackOffset=-(this.rx*this.x+this.ry*this.y);
window.clearInterval(this.animTimer);
window.clearInterval(this.animTimer2);
this.startTime=new Date().getTime();
this.animTimer=window.setInterval(this.GlideBackStr,this.del);
if(ua.dblThread)this.animTimer2=window.setInterval(this.GlideBackStr,this.del);},glideOut:function(){var t=new Date().getTime()-this.startTime;
var d=Math.ceil(GlideParams.START_SPEED/1000*t+.5*GlideParams.ACCELERATION_OUT*t*t)+this.GlideStartOffset;
if(d>=this.GlideDist){this.moveTo(0,0);
this.glideOutEnd();}else{this.moveTo(this.startX+d*this.rx,this.startY+d*this.ry);}},glideBack:function(){var t=new Date().getTime()-this.startTime;
var d=Math.ceil(GlideParams.START_SPEED/1000*t+.5*GlideParams.ACCELERATION_BACK*t*t)+this.GlideBackOffset;
if(d>=this.GlideDist){this.moveTo(this.startX,this.startY);
this.glideBackEnd();}else{this.moveTo(-d*this.rx,-d*this.ry);}},glideOutEnd:function(){this.animTimer=window.clearTimeout(this.animTimer);
this.animTimer2=window.clearTimeout(this.animTimer2);
if(!this.parentMenu)GlideMenus.activeMenu=this;
else if(ua.ns4);},glideBackEnd:function(){this.animTimer=window.clearTimeout(this.animTimer);
this.animTimer2=window.clearTimeout(this.animTimer2);
if(this.menuInCue&&this.menuInCue.over){if(this.parentMenu)(this.parentMenu.activeMenu=this.menuInCue).glideOutStart();
this.menuInCue=null;}else if(!this.parentMenu&&!this.menuInCue&&GlideMenus.activeMenu==this&&!GlideParams.CLICK_HIDE)GlideMenus.activeMenu=null;
if(this.parentMenu){if(!this.parentMenu.over&&this.fullyClosed()&&!GlideParams.CLICK_HIDE)this.parentMenu.glideBackStart();
else if(this.over)this.glideOutStart(false);
if(!GlideParams.CLICK_HIDE)this.parentMenu=null;}if(!this.over)this.frame.style.visibility="hidden";},hiliteHdr:function(){if(!this.actuator)return;
var src;
if((src=this.actuator.src)!=null){if(!this.imgSrc){this.imgSrc=src;
this.hiSrc=new Image().src=src.replace(Exps.EXT,GlideParams.IMG_OVER_EXT+"$1");}this.actuator.src=this.hiSrc;}if(!ua.ns4){this.actuator.className=(this.actuator.className+" hover").trim();
this.frame.style.zIndex=(this.parentMenu)?parseInt(this.parentMenu.frame.style.zIndex)+1:100;}},unhiliteHdr:function(){if(!this.actuator)return;
if(this.actuator.src){this.actuator.src=this.imgSrc;}if(!ua.ns4){removeClass(this.actuator,"hover");if(!this.parentMenu)this.frame.style.zIndex="";}},hide:function(){if(this.over)return;
this.activeMenu=null;
window.clearTimeout(this.hideTimer);
if(this.opening||this.fullyOpen()){this.unhiliteHdr();
this.glideBackStart();}else if(!this.closing())this.parentMenu=null;},hideTree:function(){var am=this;
for(;am.activeMenu!=null;am=am.activeMenu);
for(var p=am;(p=p.parentMenu)!=null;p.hide());
am.hide();},moveTo:(ua.ie?function(x,y){this.x=this.css.posLeft=x;this.y=this.css.posTop=y;}:function(x,y){this.css.left=(this.x=x)+ua.px;
this.css.top=(this.y=y)+ua.px;}),closing:function(){return this.animTimer&&!this.opening;},fullyOpen:function(){return this.x==0&&this.y==0;},fullyClosed:function(){return this.x==this.startX&&this.y==this.startY;},overSubmenu:function(){for(var menu=this;menu!=null;menu=menu.activeMenu)if(menu.over)return true;
return false;},initAnimProps:function(){this.GlideDist=Math.ceil(Math.sqrt(Math.pow(this.startX,2)+Math.pow(this.startY,2)));
this.rx=-this.startX/this.GlideDist;
this.ry=-this.startY/this.GlideDist;
this.del=GlideParams.FRAME_PAUSE;
if(ua.win9x&&ua.ie&&this.del<54)this.del=Math.floor(Math.pow(this.del,1-(.54-this.del/100)));},
w:function(){return ua.ns4?this.frame.clip.width:this.el.offsetWidth;},h:function(){return ua.ns4?this.frame.clip.height:this.el.offsetHeight;},getActuator:function(e){var el=getTarget(e);
return el?(el.nodeType==3)?el.parentNode:el:null;},toString:function(){return this.id;},onactivate:function(){},ondeactivate:function(){}};
if(ua.supported)document.writeln("<style type='text/css'>.menuFrame{visibility:hidden;}<"+"/style>");
function contains(a,b){if(b==null)return false;
while(a!=b&&((b=b.parentNode)!=null||ua.ns4&&(b=b.parentLayer)!=null));
return a==b;}function getPageOffset(el,off){var total=0;
if(typeof el[off]=="number")for(var parent=el;parent.offsetParent!=null;parent=parent.offsetParent)total+=parent[off];
return total;}function getTarget(e){return e&&e.target?e.target:(window.event)?event.srcElement:null;}function removeClass(el,klass){el.className=el.className.replace(getTokenizedExp(klass,"g")," ").normalize();}String.prototype.normalize=function(){return this.trim().replace(Exps.NORMALIZE," ");};
String.prototype.trim=function(){return this.replace(Exps.TRIM,"");};
Exps={NORMALIZE:/\s\s+/g,TRIM:/^\s+|\s+$/g,EXT:/(\.(.[^\.]+)$)/};
function getTokenizedExp(t,f){var x=Exps[t];if(!x)x=Exps[t]=new RegExp("(^|\\s)"+t+"($|\\s)",f);return x;}function getCookie(name){var match=(new RegExp(name+'\s?=\s?([^;]*);?','g')).exec(document.cookie)||[];
return match.length>1?unescape(match[1]):null;}