﻿<!--

var menuStatus = 0;
function toggleMenu() {
if (menuStatus == 0){
				showDiv()
				menuStatus = 1;
			}
		   	else {
				hideDiv()
				menuStatus = 0;
			}
}

function hideDiv() {
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('productsmenu').style.visibility = 'hidden';
document.getElementById('selectcover').style.visibility = 'hidden';
}
else {
if (document.layers) { // Netscape 4
document.productsmenu.visibility = 'hidden';
}
else { // IE 4
document.all.productsmenu.style.visibility = 'hidden';
}
}
}

function showDiv() {
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('productsmenu').style.visibility = 'visible';
document.getElementById('selectcover').style.visibility = 'visible';
}
else {
if (document.layers) { // Netscape 4
document.productsmenu.visibility = 'visible';
}
else { // IE 4
document.all.productsmenu.style.visibility = 'visible';
}
}
}

function popUpWindow(windowWidth,windowHeight,arg1) {
	var strlength = arg1.length;
	var isAspFile = arg1.substring(strlength-4,strlength)
	if (isAspFile == '.asp') { 
	window.open('/popups/' + arg1,'popup','width=' + windowWidth + ',height=' + windowHeight);
	}
	else {
	isAspFile = '0'
	}
	// database call to see if it's a product?
	// database call to see if it's a tech feature?
	window.open('/popups/' + arg1 + '?' + isAspFile,'popup','width=' + windowWidth + ',height=' + windowHeight);
}

var currentDefaultImage;

function showProductImages(style_number, default_image, whichImg) {
	if(currentDefaultImage)
		window.open('/popups/product_images.asp?style=' + style_number + '&defaultImage=' + currentDefaultImage + '&whichImg=' + whichImg,'images','width=700,height=690,left=25,top=25,resizable');
	else
		window.open('/popups/product_images.asp?style=' + style_number + '&defaultImage=' + default_image + '&whichImg=' + whichImg,'images','width=700,height=690,left=25,top=25,resizable');
}

function TellAFriend(style_number) {
	if(currentDefaultImage)
		window.open('/tell_friend.asp?style=' + style_number + '&defaultImage=' + currentDefaultImage,'images','width=700,height=690,left=25,top=25');
else
		window.open('/tell_friend.asp?style=' + style_number,'images','width=700,height=690,left=25,top=25');

}

function SwatchOn(arg1, style1)
{
	var x;
	for(x = 0; x < document.images.length; x++)
		if(document.images[x].name == 'prodImage')
		{
			document.images[x].src = '/products/' + style1 + '_lg.jpg';
			break;
		}
}

function popUpTechHelp(arg1, arg2)
{
	window.open('/popups/popup.asp?type=' + arg2 + '&techID=' + arg1,'techHelp','width=600,height=450,left=25,top=25,resizable,scrollbars=yes');
}

function popUpOrderReceipt(arg1) {
	window.open('/customer/view_receipt.asp?order=' + arg1, 'Receipt', 'width=800,height=800,menubar=1,status=0,toolbar=0,location=0,scrollbars=yes,resizable=no,top=50,left=50');	
}

function setbottom() {
	document.getElementById("bottom_spacer").height = screen.height - document.getElementById("page_end").offsetTop - 200;	
}


/* go to either shoe sizing / apparel sizing */
function go_sizing(select_type, select_sub_type) {
	if (select_sub_type == '')
		window.open('/popups/product_sizing.asp?size=' + select_type,'sizing','width=700,height=690,left=25,top=25,resizable,scrollbars=1');
	else
		window.open('/popups/product_sizing.asp?size=apparel#sock','sizing','width=700,height=690,left=25,top=25,resizable,scrollbars=1');
}
		
function go_width() {
	window.open('/popups/product_width.asp','width','width=700,height=690,left=25,top=25,resizable,scrollbars=1');			
}
		
/* go to either shoe sizing / apparel sizing */
function go_shoelast(select_last) {
	window.open('/popups/product_shoelasts.asp?last=' + select_last,'shoelast','width=700,height=690,left=25,top=25,resizable,scrollbars=1');
}

/* go to UPS to track the package */
function go_tracking(track_num) {
	window.open('http://app3.hongkongpost.com/CGI/mt/enquiry.jsp','Tracking','width=700,height=690,left=25,top=25,resizable');
}

/* hide or open rows */
function Check_Other(tempType, tempState2) {
	// for bill address
	if (tempType == 'bill') {
		if(document.getElementById("bill_state").value == 'Other') {
			document.getElementById("otherRow").style.display = 'block';
			document.getElementById("otherRow").style.visibility = 'visible';
			document.getElementById("otherRow2").style.display = 'block';
			document.getElementById("otherRow2").style.visibility = 'visible';				
		}
		else {
			document.getElementById("otherRow").style.display = 'none';
			document.getElementById("otherRow").style.visibility = 'hidden';
			document.getElementById("otherRow2").style.display = 'none';
			document.getElementById("otherRow2").style.visibility = 'hidden';	
			document.getElementById("bill_state2").value = '';
		}		
	}
	// for ship address
	else if (tempType == 'ship') {
		if(document.getElementById("ship_state").value == 'Other') {
			document.getElementById("otherRow3").style.display = 'block';
			document.getElementById("otherRow3").style.visibility = 'visible';	
			document.getElementById("otherRow4").style.display = 'block';
			document.getElementById("otherRow4").style.visibility = 'visible';	
		}
		else {
			document.getElementById("otherRow3").style.display = 'none';
			document.getElementById("otherRow3").style.visibility = 'hidden';	
			document.getElementById("otherRow4").style.display = 'none';
			document.getElementById("otherRow4").style.visibility = 'hidden';	
			document.getElementById("ship_state2").value = '';
		}
	}
	// for temp address
	else {
		if(document.getElementById("temp_state").value == 'Other') {
			document.getElementById("otherRow").style.display = 'block';
			document.getElementById("otherRow").style.visibility = 'visible';	
			document.getElementById("otherRow2").style.display = 'block';
			document.getElementById("otherRow2").style.visibility = 'visible';
			document.getElementById("temp_state2").value = tempState2;
		}
		else {
			document.getElementById("otherRow").style.display = 'none';
			document.getElementById("otherRow").style.visibility = 'hidden';	
			document.getElementById("otherRow2").style.display = 'none';
			document.getElementById("otherRow2").style.visibility = 'hidden';	
			document.getElementById("temp_state2").value = '';
		}
	}
}

function popUpDisclaimer()
{
	window.open('/popups/disclaimer.asp','Disclaimer','width=500,height=390,left=25,top=25,');
}

function goText() {
	window.open("/includes/captcha/image_verification.asp", "ImageText","width=400,height=345,toolbar=0,menubar=0,scrollbars=0,resizable=0"); 
}

function LastNav(arg1){
	if(opener) {
		if(opener.window) {
			opener.window.location = arg1;
					window.close();
					return;
		}
	}
	window.location = arg1;
}

// -->