function setFormValue(frm, val) 
{
	for (i=0; i<frm.options.length; i++) 
	{
		if (frm.options[i].value==val) 
		{
			frm.selectedIndex = i;
			break;
		}
	}
}

function changeProduct()
{
	var productID = document.prodlist.productID.options[document.prodlist.productID.selectedIndex].value;
	if (productID!="")
		location.href = "/list.jsp?productID="+productID;
}

var		pageToLoad;
var		winName;
function openW( pageToLoad, winName, width, height, center) 
{
xposition=0; yposition=0; 
	
	if ((parseInt(navigator.appVersion) >= 4 ) && (center))
	{
		xposition = (screen.width - width) / 2;
		yposition = (screen.height - height) / 2;    
	}
	
	args = "width=" + width + ","     + "height=" + height + "," 
	+ "location=0,"     + "menubar=0,"    + "resizable=1,"    + "scrollbars=1,"
	+ "status=0,"     + "titlebar=0,"    + "toolbar=0,"    + "hotkeys=0,"
	+ "screenx=" + xposition + ","  //NN Only
	+ "screeny=" + yposition + ","  //NN Only
	+ "left=" + xposition + ","     //IE Only
	+ "top=" + yposition;           //IE Only
	window.open( pageToLoad,winName,args );
}

function changePage(url)
{
	if (url.length>4 && url.indexOf(".")>0)
		location.href = url;
}

function changePartnerPage( frmEl )
{
	var url = frmEl.options[ frmEl.selectedIndex ].value;
	if (url.length>0)
		window.open( "http://" + url );
}

function emailThisPage()
{
	openW( "/popup_send2friend.jsp?page="+location.href,"emailpage",500, 430, 0 );
}

function isValidEmail(email)
{
	if (email.length==0 || email.indexOf("@")<1 || email.length<6)
		return false;
	else
		return true;
}


var message="";
/*
function clickIE()
{
	if (document.all) 
	{
		(message);
		return false;
	}
}


function clickNS(e) 
{
	if (document.layers||(document.getElementById&&!document.all)) 
	{
		if (e.which==1||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.onselectstart=new Function("return false");
document.oncontextmenu=new Function("return false");
*/
