<!--
function openResults(s)
{
	page = "http://" + www + "/search/results.asp" + s; // having the full absolute URL makes it so the pop-up can't redirect the opener
	winW = 490;
	winH = 420;
	winl = (screen.width-winW)/2;
	wint = (screen.height-winH)/2;
	newWin = window.open(page, "newWin", "width="+winW+",height="+winH+", top="+wint+",left="+winl+",center, center, pageY=10, pageX=10, toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
	newWin.focus();		
}

function OpenDrapery()
{
	page = "http://" + www + "/hardware/popup.asp"; // having the full absolute URL makes it so the pop-up can't redirect the opener
	winW = 510;
	winH = 420;
	winl = (screen.width-winW)/2;
	wint = (screen.height-winH)/2;
	newWin = window.open(page, "newWin", "width="+winW+",height="+winH+", top="+wint+",left="+winl+",center, center, pageY=10, pageX=10, toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
	newWin.focus();
}

function openSearch()
{
/*	page = "http://" + www + "/search/"; // having the full absolute URL makes it so the pop-up can't redirect the opener
	winW = 510;
	winH = 420;
	winl = (screen.width-winW)/2;
	wint = (screen.height-winH)/2;
	newWin = window.open(page, "newWin", "width="+winW+",height="+winH+", top="+wint+",left="+winl+",center, center, pageY=10, pageX=10, toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
	newWin.focus();*/
	window.location= "http://" + www + "/search/"
}

function openRegistration()
{
    /*page = "http://" + www + "/newaccounts";
    winW = 520;
    winH = 620;
	winl = (screen.width-winW)/2;
	wint = (screen.height-winH)/2;
	newWin = window.open(page, "newWin", "width="+winW+",height="+winH+", top="+wint+",left="+winl+",center, center, pageY=10, pageX=10, toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
	newWin.focus();  */
	window.location= "http://" + www + "/newaccounts"
}

function openFinishes(pID)
{
	page = "http://" + www + "/finishes/?pID=" + pID; // having the full absolute URL makes it so the pop-up can't redirect the opener
	winW = 700;
	winH = 550;
	winl = (screen.width-winW)/2;
	wint = (screen.height-winH)/2;
	newWin = window.open(page, "newWin", "width="+winW+",height="+winH+", top="+wint+",left="+winl+",center, center, pageY=10, pageX=10, toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
	newWin.focus();
}	

function openLogin()
{
	/*page = "http://" + www + "/login/" // having the full absolute URL makes it so the pop-up can't redirect the opener
	winW = 505;
	winH = 350;
	winl = (screen.width-winW)/2;
	wint = (screen.height-winH)/2;
	newWin = window.open(page, "newWin", "width="+winW+",height="+winH+", top="+wint+",left="+winl+",center, center, pageY=10, pageX=10, toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
	newWin.focus();*/
	window.location= "http://" + www + "/threadcount/login.asp"
	
}

function openMemo(pID)
{
	/*page = "http://" + www + "/samples/?act=add&pID=" + pID; // having the full absolute URL makes it so the pop-up can't redirect the opener
	winW = 620;
	winH = 725;
	winl = (screen.width-winW)/2;
	wint = (screen.height-winH)/2;
	newWin = window.open(page, "newWin", "width="+winW+",height="+winH+", top="+wint+",left="+winl+",center, center, pageY=10, pageX=10, toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
	newWin.focus();*/
	window.location="http://" + www + "/samples/?act=add&pID=" + pID
}

function openEmail(pID)
{
	/*page = "http://" + www + "/email/?pID=" + pID // having the full absolute URL makes it so the pop-up can't redirect the opener
	winW = 573;
	winH = 519;
	winl = (screen.width-winW)/2;
	wint = (screen.height-winH)/2;
	newWin = window.open(page, "newWin", "width="+winW+",height="+winH+", top="+wint+",left="+winl+",center, center, pageY=10, pageX=10, toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
	newWin.focus();*/
	
	window.location="http://" + www + "/email/?pID=" + pID
}

function openOrder(page)
{
	/*winW = 650;
	winH = 550;
	winl = (screen.width-winW)/2;
	wint = (screen.height-winH)/2;
	newWin = window.open(page, "newWin", "width="+winW+",height="+winH+", top="+wint+",left="+winl+",center, center, pageY=10, pageX=10, toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
	newWin.focus();*/
	window.location= "http://" + www + "/order/?page=" + page
	
}

function openOrder2()
{
	page = "http://" + www + "/order2/" // having the full absolute URL makes it so the pop-up can't redirect the opener
	winW = 650;
	winH = 350;
	winl = (screen.width-winW)/2;
	wint = (screen.height-winH)/2;
	newWin = window.open(page, "newWin", "width="+winW+",height="+winH+", top="+wint+",left="+winl+",center, center, pageY=10, pageX=10, toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
	newWin.focus();
}

function openPolicy()
{
/*	page = "http://" + www + "/policy/" // having the full absolute URL makes it so the pop-up can't redirect the opener
	winW = 500;
	winH = 540;
	winl = (screen.width-winW)/2;
	wint = (screen.height-winH)/2;
	newWin = window.open(page, "newWin", "width="+winW+",height="+winH+", top="+wint+",left="+winl+",center, center, pageY=10, pageX=10, toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
	newWin.focus();*/
	window.location="http://" + www + "/policy/"
}

function openPrivacy()
{
	/*page = "http://" + www + "/policy/index2.asp" // having the full absolute URL makes it so the pop-up can't redirect the opener
	winW = 500;
	winH = 540;
	winl = (screen.width-winW)/2;
	wint = (screen.height-winH)/2;
	newWin = window.open(page, "newWin", "width="+winW+",height="+winH+", top="+wint+",left="+winl+",center, center, pageY=10, pageX=10, toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
	newWin.focus();*/
	window.location="http://" + www + "/policy/index2.asp"
}		

function openSourcing()
{
/*	page = "http://" + www + "/sourcing/" // having the full absolute URL makes it so the pop-up can't redirect the opener
	winW = 475;
	winH = 500;
	winl = (screen.width-winW)/2;
	wint = (screen.height-winH)/2;
	newWin = window.open(page, "newWin", "width="+winW+",height="+winH+", top="+wint+",left="+winl+",center, center, pageY=10, pageX=10, toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
	newWin.focus();*/
	window.location="http://" + www + "/sourcing/"
}

function JavaTest()
{
	var q = "&";
	var pageDirect = window.location.href;
	if(pageDirect.charAt("?") == 0) q = "?";			
	location.href = pageDirect + q + "js=1";
}

function TrySearch(elem)
{
	var s = document.getElementById(elem).value;
	if(s.length > 0)
	{
		//openResults("?entry=1&s=" + s);
		window.location.href = "http://" + www + "/search/results.asp?entry=1&s=" + s
    
	}
	else
	{
		alert("Please Enter Some Text To Search With");
		document.getElementById(elem).focus();
	}		
}		
	/*	page = "/threadcount/sourcing/" // having the full absolute URL makes it so the pop-up can't redirect the opener
	winW = 475;
	winH = 500;
	winl = (screen.width-w)/2;
	wint = (screen.height-h)/2;
	newWin = window.open(page, "newWin", "width="+winW+",height="+winH+",top="+wint+",left="+winl+",center, center,pageY=10, pageX=10, toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
	newWin.focus();*/
//-->
