	
var storiesStatus 	= 'collapsed';
var myCartStatus 	= 'collapsed';
var seeMoreStatus 	= 'collapsed';
var awardsStatus 	= 'collapsed';
var retailStatus 	= 'collapsed';

var storeTOPStatus 	= 'collapsed';
var storeSRVStatus 	= 'collapsed';
var storeSRStatus 	= 'collapsed';
var storeMFSRStatus = 'collapsed';
var storeEBStatus 	= 'collapsed';
var storeQTBStatus 	= 'collapsed';
var cartObject;
var doDemo			= 'F';
var heartBeatCounter = 0;


function checkCountryBilling() {
	
	country = document.getElementById('BILLINGCOUNTRY').value;
	
	if (country == "CA") {
		document.getElementById('CanadaShipping').style.display = 'block';
		document.getElementById('USShipping').style.display = 'none';
		document.getElementById('SHIPPINGFIELD').value = "UPS-Canada";
	}
	else {
		document.getElementById('CanadaShipping').style.display = 'none';
		document.getElementById('USShipping').style.display = 'block';
		document.getElementById('SHIPPINGFIELD').value = "Standard";
	}
}


function checkCountry() {
	
	country = document.getElementById('SHIPPINGCOUNTRY').value;
	
	if (country == "CA") {
		document.getElementById('CanadaShipping').style.display = 'block';
		document.getElementById('USShipping').style.display = 'none';
		document.getElementById('SHIPPINGFIELD').value = "UPS-Canada";
	}
	else {
		document.getElementById('CanadaShipping').style.display = 'none';
		document.getElementById('USShipping').style.display = 'block';
		document.getElementById('SHIPPINGFIELD').value = "Standard";
	}
}


function setShippingMethod() {
	
	country = document.getElementById('SHIPPINGCOUNTRY').value;
	
	if (country == "CA") {
		document.getElementById('SHIPPINGFIELD').value = document.getElementById('SHIPPINGMETHODCANADA').value;
	}
	else {
		document.getElementById('SHIPPINGFIELD').value = document.getElementById('SHIPPINGMETHOD').value;
	}
}




function heartBeat() {
	
	heartBeatCounter++;
	
	var theTag = document.location.href + "?" + heartBeatCounter;
	
	urchinTracker(theTag);
	
	t = setTimeout("heartBeat()",15000)
}


function trackLink(theTag, loadType, theLink) {
	
	urchinTracker(theTag);
	
	if (loadType == 'int') {
		load(theLink);
	}
	else {
		document.location.href = theLink;
	}
	
}



function testForObject(Id) {
	var o;
	o = document.getElementById(Id);
	if (o) { return o; }
	
	return null;
}



function keyPress() {
	return false;
}




function showPopup(theName, theDesc) {
	

	
	theDiv = 'productName';
	document.getElementById(theDiv).innerHTML = theName;
	
	theDiv = 'popupProductDescription';
	document.getElementById(theDiv).innerHTML = theDesc;
	
	theDiv = 'popup';
	document.getElementById(theDiv).style.display = 'block';	
	
}



function hidePopup() {
	
	theDiv = 'popup';
	document.getElementById(theDiv).style.display = 'none';		
}



function noSubmit() {
	
  	return false; 
}






function checkFields() {
	
	if (document.checkoutForm.BILLINGNAME.value == "full name") { 
		alert("Please enter your full name.");
		return false;
	}
	
	if (document.checkoutForm.EMAIL.value == "email") { 
		alert("Please enter your email address.");
		return false;
	}
	
	if (document.checkoutForm.BILLINGADDRESS.value == "address") { 
		alert("Please enter your billing street address.");
		return false;
	}
	
	if (document.checkoutForm.BILLINGCITY.value == "city") { 
		alert("Please enter your billing city.");
		return false;
	}
	
	if (document.checkoutForm.BILLINGSTATE.value == "*") { 
		alert("Please enter your billing state.");
		return false;
	}
	
	if (document.checkoutForm.BILLINGZIP.value == "zip") { 
		alert("Please enter your billing zip.");
		return false;
	}
	
	if (document.checkoutForm.BILLINGCOUNTRY.value == "*") { 
		alert("Please enter your billing country.");
		return false;
	}
	
	if (document.checkoutForm.CARDNUM.value == "card number") { 
		alert("Please enter your credit card number.");
		return false;
	}
	
	if (document.checkoutForm.CARDEXPMONTH.value == "*") { 
		alert("Please choose your card expiration month.");
		return false;
	}
	
	if (document.checkoutForm.CARDEXPYEAR.value == "*") { 
		alert("Please choose your card expiration year.");
		return false;
	}
	
	return true;
}


function showCheckout() {
	
	theDiv = 'miniPanelMyCart';
	document.getElementById(theDiv).style.display = 'none';	
	
	theDiv = 'miniPanelCheckout';
	document.getElementById(theDiv).style.display = 'block';	
	
}


function checkout() {
	
	var tmp = checkFields();
	
	if (tmp == true) { 
	
		showCheckout();
	
		document.checkoutForm.submit();
	}
	
}





function showCart() {
	
	theDiv = 'miniPanelMyCart';
	document.getElementById(theDiv).style.display = 'block';	
	
	theDiv = 'miniPanelCheckout';
	document.getElementById(theDiv).style.display = 'none';	
	
}





function getVideo() {
	var theVideoUrl = formURL + '/showVideo.cgi?SITEID=' + siteID + '&ITEM=' + currentOnMenu;
	loadVideo(theVideoUrl);
	
	var theVid = "/" + theVideoUrl;
	urchinTracker(theVid);
}
				
				
function getPlayDemoVideo() {


	var theVideoUrl = formURL + '/showPlayDemoVideo.cgi?SITEID=' + siteID + '&ITEM=' + currentOnMenu;
	loadVideo(theVideoUrl);
	
	var theVid = "/" + theVideoUrl;
	urchinTracker(theVid);
}


				
function doShop() {
	
	var theUrl = formURL + '/showStore.cgi?SITEID=' + siteID;
	load(theUrl);
	
	storeTOPStatus 	= 'expanded';
	storeSRVStatus 	= 'collapsed';
	storeSRStatus 	= 'collapsed';
	storeMFSRStatus = 'collapsed';
	storeEBStatus 	= 'collapsed';
	storeQTBStatus 	= 'collapsed';
	
	var theAction = "/Store Clicked";
	urchinTracker(theAction);
}
	
	

function resetCheckout() {
	
	var url = formURL + '/showCheckout.cgi';
	loadCheckout(url);
				
}



	
function addToCart(sku) {
	
	showCart();
	//resetCheckout();
	
	var url = formURL + '/addToCart.cgi?SKU=' + sku;
	//alert(url);
	
	loadCart(url);
}







function clickclear(thisfield, defaulttext) {
	if (thisfield.value == defaulttext) {
		thisfield.value = "";
	}
}

function clickrecall(thisfield, defaulttext) {
	if (thisfield.value == "") {
		thisfield.value = defaulttext;
	}
}

function showBilling() {
	cartObject.showTabByIndex(0);
}

function showShipping() {
	
	document.getElementById('SHIPPINGNAME').value = document.getElementById('BILLINGNAME').value;
	document.getElementById('SHIPPINGADDRESS').value = document.getElementById('BILLINGADDRESS').value;
	document.getElementById('SHIPPINGCITY').value = document.getElementById('BILLINGCITY').value;
	document.getElementById('SHIPPINGSTATE').value = document.getElementById('BILLINGSTATE').value;
	document.getElementById('SHIPPINGZIP').value = document.getElementById('BILLINGZIP').value;
	document.getElementById('SHIPPINGCOUNTRY').value = document.getElementById('BILLINGCOUNTRY').value;
	
	cartObject.showTabByIndex(1);
}


function showCardInfo() {
	cartObject.showTabByIndex(2);
}



function showVerifyOrder() {
	
	shipping = document.getElementById('SHIPPINGMETHOD').value
	siteID = document.getElementById('SITEID').value
	
	var tmp = formData2QueryString(document.forms['checkoutForm']);
	
	var url = formURL + '/showVerifyOrder.cgi?' + tmp + '&SHIPPING=' + shipping + '&SITEID=' + siteID;
	
	loadVerifyOrder(url);
	
	cartObject.showTabByIndex(3);
}



function overHome() {
	if (currentOnMenu != 'HOME') {
		document.images.home.src= baseURL + '/art/sites/' + siteID + '/homeGlow.jpg';
	}
}

function outHome() {
	if (currentOnMenu != 'HOME') {
		document.images.home.src= baseURL + '/art/sites/' + siteID + '/home.jpg';
	}	
}

function showHome() {
	resetMenus();
	document.images.home.src= baseURL + '/art/sites/' + siteID + '/homeOn.jpg';
	var theUrl = formURL + '/showMainOffer.cgi?SITEID=' + siteID + '&ITEM=HOME';
	load(theUrl);
	currentOnMenu = 'HOME';
	theUrl = formURL + '/showPubSpecial2.cgi?SITEID=' + siteID + '&ITEM=HOME';
	loadPubSpecial(theUrl);
	urchinTracker('/HOME');
}





function overQtb() {
	if (currentOnMenu != 'QTB') {
		document.images.qtb.src= baseURL + '/art/sites/' + siteID + '/qtbGlow.jpg';
	}
}

function outQtb() {
	if (currentOnMenu != 'QTB') {
		document.images.qtb.src= baseURL + '/art/sites/' + siteID + '/qtb.jpg';
	}	
}

function showQtb() {
	resetMenus();
	document.images.qtb.src= baseURL + '/art/sites/' + siteID + '/qtbOn.jpg';
	var theUrl = formURL + '/showMainOffer.cgi?SITEID=' + siteID + '&ITEM=QTB';
	load(theUrl);
	currentOnMenu = 'QTB';
	theUrl = formURL + '/showPubSpecial2.cgi?SITEID=' + siteID + '&ITEM=QTB';
	loadPubSpecial(theUrl);
	urchinTracker('/QTB');
}




function overEb() {
	if (currentOnMenu != 'EB') {
		document.images.eb.src= baseURL + '/art/sites/' + siteID + '/ebGlow.jpg';
	}
}

function outEb() {
	if (currentOnMenu != 'EB') {
		document.images.eb.src= baseURL + '/art/sites/' + siteID + '/eb.jpg';
	}	
}

function showEb() {
	resetMenus();
	document.images.eb.src= baseURL + '/art/sites/' + siteID + '/ebOn.jpg';
	var theUrl = formURL + '/showMainOffer.cgi?SITEID=' + siteID + '&ITEM=EB';
	load(theUrl);
	currentOnMenu = 'EB';
	theUrl = formURL + '/showPubSpecial2.cgi?SITEID=' + siteID + '&ITEM=EB';
	loadPubSpecial(theUrl);
	urchinTracker('/EB');
}




function overMfsr() {
	if (currentOnMenu != 'MFSR') {
		document.images.mfsr.src= baseURL + '/art/sites/' + siteID + '/mfsrGlow.jpg';
	}
}

function outMfsr() {
	if (currentOnMenu != 'MFSR') {
		document.images.mfsr.src= baseURL + '/art/sites/' + siteID + '/mfsr.jpg';
	}	
}

function showMfsr() {
	resetMenus();
	document.images.mfsr.src= baseURL + '/art/sites/' + siteID + '/mfsrOn.jpg';
	var theUrl = formURL + '/showMainOffer.cgi?SITEID=' + siteID + '&ITEM=MFSR';
	load(theUrl);
	currentOnMenu = 'MFSR';
	theUrl = formURL + '/showPubSpecial2.cgi?SITEID=' + siteID + '&ITEM=MFSR';
	loadPubSpecial(theUrl);
	urchinTracker('/MFSR');
}



function overSr() {
	if (currentOnMenu != 'SR') {
		document.images.sr.src= baseURL + '/art/sites/' + siteID + '/srGlow.jpg';
	}
}

function outSr() {
	if (currentOnMenu != 'SR') {
		document.images.sr.src= baseURL + '/art/sites/' + siteID + '/sr.jpg';
	}	
}

function showSr() {
	resetMenus();
	document.images.sr.src= baseURL + '/art/sites/' + siteID + '/srOn.jpg';
	var theUrl = formURL + '/showMainOffer.cgi?SITEID=' + siteID + '&ITEM=SR';
	load(theUrl);
	currentOnMenu = 'SR';
	theUrl = formURL + '/showPubSpecial2.cgi?SITEID=' + siteID + '&ITEM=SR';
	loadPubSpecial(theUrl);
	urchinTracker('/SR');
}



function overSrv() {
	var tmp = document.images.srv.src;
	if (currentOnMenu != 'SRV') {
		document.images.srv.src= baseURL + '/art/sites/' + siteID + '/srvGlow.jpg';
	}
}

function outSrv() {
	if (currentOnMenu != 'SRV') {
		document.images.srv.src= baseURL + '/art/sites/' + siteID + '/srv.jpg';
	}	
}

function showSrv() {
	resetMenus();
	document.images.srv.src= baseURL + '/art/sites/' + siteID + '/srvOn.jpg';
	var theUrl = formURL + '/showMainOffer.cgi?SITEID=' + siteID + '&ITEM=SRV';
	load(theUrl);
	currentOnMenu = 'SRV';
	theUrl = formURL + '/showPubSpecial2.cgi?SITEID=' + siteID + '&ITEM=SRV';
	loadPubSpecial(theUrl);
	urchinTracker('/SRV');
}
			
			
function showPrivacy() {
	var theUrl = formURL + '/showPrivacyPolicy.cgi?SITEID=' + siteID;
	load(theUrl);
}

function showContactUs() {
	var theUrl = formURL + '/showContactUs.cgi?SITEID=' + siteID;
	load(theUrl);
}


function writeFlash(flashdata) 
{ 
	document.write(flashdata); 
} 

			
			

function goBack() {
	
	//alert(currentOnMenu);
	
	if (currentOnMenu == 'HOME') 	{ showHome(); }	
	if (currentOnMenu == 'SRV') 	{ showSrv(); }	
	if (currentOnMenu == 'SR') 		{ showSr(); }	
	if (currentOnMenu == 'MFSR') 	{ showMfsr(); }	
	if (currentOnMenu == 'EB') 		{ showEb(); }		
	if (currentOnMenu == 'QTB') 	{ showQtb(); }	
}



function showDemo(a, b) {
	resetMenus();
	document.images.srv.src= baseURL + '/art/sites/' + siteID + '/srvOn.jpg';
	var theUrl = formURL + '/showMainOffer.cgi?SITEID=' + siteID + '&ITEM=SRV';
	currentOnMenu = 'SRV';
	doDemo = 'T';
	load(theUrl);
	
}


function doOpacity(theID, opacStart, opacEnd, millisec) {

	var speed = millisec / 100; 
	var timer = 0; 
	
	//determine the direction for the blending, if start and end are the same nothing happens 
	if(opacStart > opacEnd) { 
		for(i = opacStart; i >= opacEnd; i--) { 
			setTimeout("changeOpac(" + i + ",'" + theID + "')",(timer * speed)); 
			timer++; 
		} 
	} else if(opacStart < opacEnd) { 
	for(i = opacStart; i <= opacEnd; i++) 
	{ 
		setTimeout("changeOpac(" + i + ",'" + theID + "')",(timer * speed)); 
		timer++; 
	} 
	} 
} 

//change the opacity for different browsers 
function changeOpac(opacity, theID) { 
var object = document.getElementById(theID).style; 
object.opacity = (opacity / 100); 
object.MozOpacity = (opacity / 100); 
object.KhtmlOpacity = (opacity / 100); 
object.filter = "alpha(opacity=" + opacity + ")"; 
}







var xmlhttpPubSpecial;
	function loadPubSpecial(url)
	{
		
		
		//theDiv = document.getElementById('pubSpecial');
		//theDiv.innerHTML='<center><img style="padding-top:3px;" src="' + baseURL + '/art/loadingSmall.gif"> <span style="position:relative; top:-3px;">Loading...</span></center>';
		
		xmlhttpPubSpecial=null
		// code for Mozilla, etc.
		if (window.XMLHttpRequest)
		  {
		  xmlhttpPubSpecial=new XMLHttpRequest()
		  }
		// code for IE
		else if (window.ActiveXObject)
		  {
		  xmlhttpPubSpecial=new ActiveXObject("Microsoft.XMLHTTP")
		  }
		if (xmlhttpPubSpecial!=null)
		  {
		  xmlhttpPubSpecial.onreadystatechange=state_ChangePubSpecial
		  xmlhttpPubSpecial.open("GET",url,true)
		  xmlhttpPubSpecial.send(null)
		  }
		else
		  {
		  alert("Your browser does not support XMLHTTP.")
		  }
		}
		function state_ChangePubSpecial()
		{
		// if xmlhttpPubSpecial shows "loaded"
		if (xmlhttpPubSpecial.readyState==4)
		  {
		  // if "OK"
		  
		  if (xmlhttpPubSpecial.status==200)
			{
				theDiv = document.getElementById('pubSpecial');
				theDiv.innerHTML = xmlhttpPubSpecial.responseText;
			}
		 
		  }
	 }
	 
	 
	 
	 
	 

	var xmlhttpCheckout;
	function loadCheckout(url)
	{
		
		
		theDiv = document.getElementById('miniPanelCheckout');
		theDiv.innerHTML='<center><img style="padding-top:3px;" src="' + baseURL + '/art/loadingSmall.gif"> <span style="position:relative; top:-3px;">Loading...</span></center>';
		
		xmlhttpCheckout=null
		// code for Mozilla, etc.
		if (window.XMLHttpRequest)
		  {
		  xmlhttpCheckout=new XMLHttpRequest()
		  }
		// code for IE
		else if (window.ActiveXObject)
		  {
		  xmlhttpCheckout=new ActiveXObject("Microsoft.XMLHTTP")
		  }
		if (xmlhttpCheckout!=null)
		  {
		  xmlhttpCheckout.onreadystatechange=state_ChangeCheckout
		  xmlhttpCheckout.open("GET",url,true)
		  xmlhttpCheckout.send(null)
		  }
		else
		  {
		  alert("Your browser does not support XMLHTTP.")
		  }
		}
		function state_ChangeCheckout()
		{
		// if xmlhttpCheckout shows "loaded"
		if (xmlhttpCheckout.readyState==4)
		  {
		  // if "OK"
		  
		  if (xmlhttpCheckout.status==200)
			{
				theDiv = document.getElementById('miniPanelCheckout');
				theDiv.innerHTML = xmlhttpCheckout.responseText;
				
				
				
			}
		  else
			{
			alert("Problem retrieving XML data")
			}
		  }
	 }
	 
	 
	 





	var xmlhttpCart;
	function loadCart(url)
	{
		theDiv = document.getElementById('myCartData');
		theDiv.innerHTML='<img style="padding-top:3px;" src="' + baseURL + '/art/loadingSmall.gif"> <span style="position:relative; top:-3px;">Loading...</span>';
		
		xmlhttpCart=null
		// code for Mozilla, etc.
		if (window.XMLHttpRequest)
		  {
		  xmlhttpCart=new XMLHttpRequest()
		  }
		// code for IE
		else if (window.ActiveXObject)
		  {
		  xmlhttpCart=new ActiveXObject("Microsoft.XMLHTTP")
		  }
		if (xmlhttpCart!=null)
		  {
		  xmlhttpCart.onreadystatechange=state_ChangeCart
		  xmlhttpCart.open("GET",url,true)
		  xmlhttpCart.send(null)
		  }
		else
		  {
		  alert("Your browser does not support XMLHTTP.")
		  }
		}
		function state_ChangeCart()
		{
		// if xmlhttpCart shows "loaded"
		if (xmlhttpCart.readyState==4)
		  {
		  // if "OK"
		  
		  if (xmlhttpCart.status==200)
			{
				theDiv = document.getElementById('myCartData');
				theDiv.innerHTML = xmlhttpCart.responseText;
			
				//alert(xmlhttpCart.responseText);
				
			}
		  else
			{
			alert("Problem retrieving XML data")
			}
		  }
	 }



	function loadVideo(url)
	{
		
		xmlhttpVideo=null
		// code for Mozilla, etc.
		if (window.XMLHttpRequest)
		  {
		  xmlhttpVideo=new XMLHttpRequest()
		  }
		// code for IE
		else if (window.ActiveXObject)
		  {
		  xmlhttpVideo=new ActiveXObject("Microsoft.XMLHTTP")
		  }
		if (xmlhttpVideo!=null)
		  {
		  xmlhttpVideo.onreadystatechange=state_ChangeVideo
		  xmlhttpVideo.open("GET",url,true)
		  xmlhttpVideo.send(null)
		  }
		else
		  {
		  alert("Your browser does not support XMLHTTP.")
		  }
		}
		function state_ChangeVideo()
		{
		// if xmlhttpVideo shows "loaded"
		if (xmlhttpVideo.readyState==4)
		  {
		  // if "OK"
		  
		  if (xmlhttpVideo.status==200)
			{
				theDiv = document.getElementById('videoScreen');
				theDiv.innerHTML = xmlhttpVideo.responseText;
					
			}
		  else
			{
			alert("Problem retrieving XML data")
			}
		  }
	 }






function loadVerifyOrder(url)
	{
		theDiv = document.getElementById('verifyOrder');
		theDiv.innerHTML='<img style="padding-top:8px;" src="' + baseURL + '/art/loadingSmall.gif"> <span style="position:relative; top:-7px;">Loading...</span>';
		
		xmlhttp=null
		// code for Mozilla, etc.
		if (window.XMLHttpRequest)
		  {
		  xmlhttp=new XMLHttpRequest()
		  }
		// code for IE
		else if (window.ActiveXObject)
		  {
		  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
		  }
		if (xmlhttp!=null)
		  {
		  xmlhttp.onreadystatechange=state_ChangeVerifyOrder
		  xmlhttp.open("GET",url,true)
		  xmlhttp.send(null)
		  }
		else
		  {
		  alert("Your browser does not support XMLHTTP.")
		  }
		}
		function state_ChangeVerifyOrder()
		{
		// if xmlhttp shows "loaded"
		if (xmlhttp.readyState==4)
		  {
		  // if "OK"
		  
		  if (xmlhttp.status==200)
			{
				theDiv = document.getElementById('verifyOrder');
				theDiv.innerHTML = xmlhttp.responseText;
				
				
			}
		  else
			{
			alert("Problem retrieving XML data")
			}
		  }
	 }
	 
	 
	 
	 
	
	// Ajax GET loader
	function load(url, doDemo)
	{
		//el = document.getElementById('progress');
		//el.innerHTML = "<img src='%%kTemplateURL%%/admin/images/bar.gif'> Loading...";
		
		loading.style.display = 'block';
		
		//fadeOut(100);
		
		mainPanel.style.display = 'none';
		//doOpacity('mainPanel', 100, 0, 500);
		
		xmlhttp=null
		// code for Mozilla, etc.
		if (window.XMLHttpRequest)
		  {
		  xmlhttp=new XMLHttpRequest()
		  }
		// code for IE
		else if (window.ActiveXObject)
		  {
		  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
		  }
		if (xmlhttp!=null)
		  {
		  xmlhttp.onreadystatechange=state_Change
		  xmlhttp.open("GET",url,true)
		  xmlhttp.send(null)
		  }
		else
		  {
		  alert("Your browser does not support XMLHTTP.")
		  }
		}
		function state_Change()
		{
		// if xmlhttp shows "loaded"
		if (xmlhttp.readyState==4)
		  {
		  // if "OK"
		  
		  if (xmlhttp.status==200)
			{
				loading.style.display = 'none';
				mainPanel.style.display = 'block';
				//fadeIn(99);
				
				//doOpacity('mainPanel', 0, 100, 500);
				
				el = document.getElementById('mainPanel');
				el.innerHTML = xmlhttp.responseText;
				
				
				
				if (doDemo == 'T') {
					getPlayDemoVideo();
					doDemo='F';
				}
				else {
					getVideo();
				}
				
			}
		  else
			{
			alert("Problem retrieving XML data")
			}
		  }
	 }

	 
	 

function recalculateCart() {
	
	var theForm = document.getElementById('cartForm');
	
	var theVars = formData2QueryString(theForm);
	
	var theUrl = formURL + '/recalculateCart.cgi?' + theVars
	
	
	loadCart(theUrl);

}



	 

	// Prep Form for POSTing
	function formData2QueryString(docForm) {
	
	  var submitContent = '';
	  var formElem;
	  var lastElemName = '';
	  
	  for (i = 0; i < docForm.elements.length; i++) {
		
		formElem = docForm.elements[i];
		
		switch (formElem.type) {
		  // Text fields, hidden form elements
		  
		  case 'text':
		  submitContent += formElem.name + '=' + escape(formElem.value) + '&'
			break;
			
		  case 'hidden':
		  submitContent += formElem.name + '=' + escape(formElem.value) + '&'
			break;
			
		  case 'password':
		  submitContent += formElem.name + '=' + escape(formElem.value) + '&'
			break;
			
		  case 'textarea':
		  submitContent += formElem.name + '=' + escape(formElem.value) + '&'
			break;
			
		  case 'select-one':
		  submitContent += formElem.name + '=' + escape(formElem.value) + '&'
			break;
			
		  case 'select-multiple':
		  submitContent += formElem.name + '=' + escape(formElem.value) + '&'
			break;
			
		  case 'submit':
		  submitContent += formElem.name + '=' + escape(formElem.value) + '&'
			break;
			
		  case 'image':
		  submitContent += formElem.name + '=' + escape(formElem.value) + '&'
			break;
			
			
		  // Radio buttons
		  case 'radio':
			if (formElem.checked) {
			  submitContent += formElem.name + '=' + escape(formElem.value) + '&'
			}
			break;
			
		  // Checkboxes
		  case 'checkbox':
			if (formElem.checked) {
			  // Continuing multiple, same-name checkboxes
			  if (formElem.name == lastElemName) {
				// Strip of end ampersand if there is one
				if (submitContent.lastIndexOf('&') == submitContent.length-1) {
				  submitContent = submitContent.substr(0, submitContent.length - 1);
				}
				// Append value as comma-delimited string
				submitContent += ',' + escape(formElem.value);
			  }
			  else {
				submitContent += formElem.name + '=' + escape(formElem.value);
			  }
			  submitContent += '&';
			  lastElemName = formElem.name;
			}
			break;
			
		}
	  }
	  // Remove trailing separator
	  submitContent = submitContent.substr(0, submitContent.length - 1);
	  
	  return submitContent;
	}
		 
	 
		
function resetMenus() {
	document.images.home.src= baseURL + '/art/sites/' + siteID + '/home.jpg'; 
	document.images.srv.src= baseURL + '/art/sites/' + siteID + '/srv.jpg'; 		
	document.images.sr.src= baseURL + '/art/sites/' + siteID + '/sr.jpg';			
	document.images.mfsr.src= baseURL + '/art/sites/' + siteID + '/mfsr.jpg';		
	document.images.eb.src= baseURL + '/art/sites/' + siteID + '/eb.jpg';			
	document.images.qtb.src= baseURL + '/art/sites/' + siteID + '/qtb.jpg';		
}





function preLoad() {
	preload_image_object = new Image();
	// set image url
	image_url = new Array();
	
	image_url[0] = baseURL + '/art/sites/' + siteID + '/storeTopHeader.jpg';
	image_url[1] = baseURL + '/art/sites/' + siteID + '/storeSRVHeader.jpg';
	image_url[2] = baseURL + '/art/sites/' + siteID + '/storeSRHeader.jpg';
	image_url[3] = baseURL + '/art/sites/' + siteID + '/storeMFSRHeader.jpg';
	image_url[4] = baseURL + '/art/sites/' + siteID + '/storeEBHeader.jpg';
	image_url[5] = baseURL + '/art/sites/' + siteID + '/storeQTBHeader.jpg';
	image_url[6] = baseURL + '/art/sites/' + siteID + '/mfsr.jpg';
	image_url[7] = baseURL + '/art/sites/' + siteID + '/mfsrGlow.jpg';
	image_url[8] = baseURL + '/art/sites/' + siteID + '/mfsrOn.jpg';
	image_url[9] = baseURL + '/art/sites/' + siteID + 'eb.jpg';
	image_url[10] = baseURL + '/art/sites/' + siteID + '/ebGlow.jpg';
	image_url[11] = baseURL + '/art/sites/' + siteID + '/ebOn.jpg';
	image_url[12] = baseURL + '/art/sites/' + siteID + '/qtb.jpg';
	image_url[13] = baseURL + '/art/sites/' + siteID + '/qtbGlow.jpg';
	image_url[14] = baseURL + '/art/sites/' + siteID + '/qtbOn.jpg';
	image_url[15] = baseURL + '/art/sites/' + siteID + '/addToCartGlow.png';
	image_url[16] = baseURL + '/art/sites/' + siteID + '/learnMoreGlow.png';
	image_url[17] = baseURL + '/art/sites/' + siteID + '/loading.gif';
	image_url[18] = baseURL + '/art/sites/' + siteID + '/playDemo.png';
	image_url[19] = baseURL + '/art/'+ '/loadingSmall.gif';
	image_url[20] = baseURL + '/art/sites/' + siteID + '/srv.jpg';
	image_url[21] = baseURL + '/art/sites/' + siteID + '/srvGlow.jpg';
	image_url[22] = baseURL + '/art/sites/' + siteID + '/srvOn.jpg';
	image_url[23] = baseURL + '/art/sites/' + siteID + '/sr.jpg';
	image_url[24] = baseURL + '/art/sites/' + siteID + '/srGlow.jpg';
	image_url[25] = baseURL + '/art/sites/' + siteID + '/srOn.jpg';
	
	var i = 0;
	for(i=0; i<=25; i++) 
	preload_image_object.src = image_url[i];
}

			
			
function miniPanelToggle(theDiv, theButton) {
	
	
	
	if (theDiv == 'miniPanelMyCart') {
		if (myCartStatus == 'expanded') {
			myCartStatus = 'collapsed';
			document.getElementById(theDiv).style.display = 'none';	
			theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
			
		}
		else {
			myCartStatus = 'expanded';
			document.getElementById(theDiv).style.display = 'block';
			theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelMinus.jpg';
		}
	}
	
	
	if (theDiv == 'miniPanelSeeMore') {
		if (seeMoreStatus == 'expanded') {
			seeMoreStatus = 'collapsed';
			document.getElementById(theDiv).style.display = 'none';	
			theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
		}
		else {
			seeMoreStatus = 'expanded';
			document.getElementById(theDiv).style.display = 'block';
			theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelMinus.jpg';
		}
	}
	
	
	if (theDiv == 'miniPanelStories') {
		if (storiesStatus == 'expanded') {
			storiesStatus = 'collapsed';
			document.getElementById(theDiv).style.display = 'none';	
			theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
		}
		else {
			storiesStatus = 'expanded';
			document.getElementById(theDiv).style.display = 'block';
			theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelMinus.jpg';
		}
	}
	
	
	if (theDiv == 'miniPanelAwards') {
		if (awardsStatus == 'expanded') {
			awardsStatus = 'collapsed';
			document.getElementById(theDiv).style.display = 'none';	
			theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
		}
		else {
			awardsStatus = 'expanded';
			document.getElementById(theDiv).style.display = 'block';
			theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelMinus.jpg';
		}
	}
	
	
	if (theDiv == 'miniPanelRetail') {
		if (retailStatus == 'expanded') {
			retailStatus = 'collapsed';
			document.getElementById(theDiv).style.display = 'none';	
			theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
		}
		else {
			retailStatus = 'expanded';
			document.getElementById(theDiv).style.display = 'block';
			theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelMinus.jpg';
		}
	}
	
	
}





function closeStorePanels() {
	
	storeTOPStatus 	= 'collapsed'; 
	storeSRVStatus 	= 'collapsed'; 
	storeSRStatus 	= 'collapsed'; 
	storeMFSRStatus = 'collapsed'; 
	storeEBStatus 	= 'collapsed'; 
	storeQTBStatus 	= 'collapsed'; 
	
	var o;
	
	o = testForObject("storePanelTOP");
	if (o) {
		theDiv = 'storePanelTOP';
		document.getElementById(theDiv).style.display = 'none';	
		document.getElementById('TOPMinus').src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';	
		document.getElementById('TOPPlus').src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
	}
	
	o = testForObject("storePanelSRV");
	if (o) {
		theDiv = 'storePanelSRV';
		document.getElementById(theDiv).style.display = 'none';	
		document.getElementById('SRVMinus').src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
		document.getElementById('SRVPlus').src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
	}
	
	o = testForObject("storePanelSR");
	if (o) {
		theDiv = 'storePanelSR';
		document.getElementById(theDiv).style.display = 'none';	
		document.getElementById('SRMinus').src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
		document.getElementById('SRPlus').src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
	}
	
	o = testForObject("storePanelMFSR");
	if (o) {
		theDiv = 'storePanelMFSR';
		document.getElementById(theDiv).style.display = 'none';	
		document.getElementById('MFSRMinus').src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
		document.getElementById('MFSRPlus').src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
	}
	
	o = testForObject("storePanelEB");
	if (o) {
		theDiv = 'storePanelEB';
		document.getElementById(theDiv).style.display = 'none';	
		document.getElementById('EBMinus').src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
		document.getElementById('EBPlus').src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
	}
	
	o = testForObject("storePanelQTB");
	if (o) {
		theDiv = 'storePanelQTB';
		document.getElementById(theDiv).style.display = 'none';	
		document.getElementById('QTBMinus').src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
		document.getElementById('QTBPlus').src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
	}
	
}


		
function storePanelToggle(theDiv, theButton) {
	
	var o;
	
	closeStorePanels();
				
	if (theDiv == 'storePanelTOP') {
		o = testForObject("storePanelTOP");
		if (o) {
			if (storeTOPStatus == 'expanded') {
				storeTOPStatus = 'collapsed';
				document.getElementById(theDiv).style.display = 'none';	
				theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
				
			}
			else {
				storeTOPStatus = 'expanded';
				document.getElementById(theDiv).style.display = 'block';
				theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelMinus.jpg';
			}
		}
	}
	
	
	
	
	if (theDiv == 'storePanelSRV') {
		o = testForObject("storePanelSRV");
		if (o) {
			if (storeSRVStatus == 'expanded') {
				storeSRVStatus = 'collapsed';
				document.getElementById(theDiv).style.display = 'none';	
				theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
				
			}
			else {
				storeSRVStatus = 'expanded';
				document.getElementById(theDiv).style.display = 'block';
				theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelMinus.jpg';
			}
		}
	}
	
	
	
	if (theDiv == 'storePanelSR') {
		o = testForObject("storePanelSR");
		if (o) {
			if (storeSRStatus == 'expanded') {
				storeSRStatus = 'collapsed';
				document.getElementById(theDiv).style.display = 'none';	
				theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
				
			}
			else {
				storeSRStatus = 'expanded';
				document.getElementById(theDiv).style.display = 'block';
				theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelMinus.jpg';
			}
		}
	}
	
	
	
	
	if (theDiv == 'storePanelMFSR') {
		o = testForObject("storePanelMFSR");
		if (o) {
			if (storeMFSRStatus == 'expanded') {
				storeMFSRStatus = 'collapsed';
				document.getElementById(theDiv).style.display = 'none';	
				theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
			}
			else {
				storeMFSRStatus = 'expanded';
				document.getElementById(theDiv).style.display = 'block';
				theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelMinus.jpg';
			}
		}
	}
	
	
	
	if (theDiv == 'storePanelEB') {
		o = testForObject("storePanelEB");
		if (o) {
			if (storeEBStatus == 'expanded') {
				storeEBStatus = 'collapsed';
				document.getElementById(theDiv).style.display = 'none';	
				theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
				
			}
			else {
				storeEBStatus = 'expanded';
				document.getElementById(theDiv).style.display = 'block';
				theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelMinus.jpg';
			}
		}
	}
	
	
	
	if (theDiv == 'storePanelQTB') {
		o = testForObject("storePanelQTB");
		if (o) {
			if (storeQTBStatus == 'expanded') {
				storeQTBStatus = 'collapsed';
				document.getElementById(theDiv).style.display = 'none';	
				theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelPlus.jpg';
				
			}
			else {
				storeQTBStatus = 'expanded';
				document.getElementById(theDiv).style.display = 'block';
				theButton.src = baseURL + '/art/sites/' + siteID + '/miniPanelMinus.jpg';
			}
		}
	}
	
	
}





function doOut(theImg, theSrc) {
	var tmp = theImg.src.IndexOf('On');
	
	if (theImg.src.IndexOf('On') < 0) {
		theImg.src = theSrc;
	}
}

