var roll_marker = new Image();
var roll_marker_off = new Image();

roll_marker.src = "/Images/side_nav/markers/white_mark_inv.gif";
roll_marker_off.src = "/Images/shim.gif";

function doButtons(picimage,imagename) {
		eval("document[imagename].src = " + picimage + ".src");
	}

function doButtonsOff(picimage,imagename) {
	eval("document[imagename].src = " + picimage + ".src");
}

function checkSelect(value) {
	if (value=="")
	{
		return false;
	}
	else
	{

		var arrSelection;
		var intStatus;
		var strURL;

		arrSelection = value.split(',');
		intStatus 	= arrSelection[0];
		strURL		= arrSelection[1];
		if (intStatus == 1)
		{
			window.open('http://' + strURL);
		}
		else if (intStatus == 0)
		{
			window.location = '/' + strURL;
		}
	}
}

function ChangeCountrySelect(value) {
	if (value=="")
	{
		return false;
	}
	else
	{

		var arrSelection;
		var intStatus;
		var strURL;

		arrSelection = value.split(',');
		intStatus 	= arrSelection[0];
		intCountryID= arrSelection[1];
		strURL		= arrSelection[2];
		if (intStatus == 0)
		{
			window.open('http://' + strURL);
		}
		else if (intStatus == 1)
		{
		document.form10.submit()
		}
	}
}

function ChangeCountrySelect2(value) {
	if (value=="")
	{
		return false;
	}
	else
	{
		var arrSelection;
		arrSelection = value.split(',');
		intStatus 	= arrSelection[0];
		intType		= arrSelection[1]
		strURL		= arrSelection[2];

		if (intStatus == 0)
		{
			window.open('http://' + strURL);
			document.form10.submit()
		}
		else if (intStatus == 1)
		{
			document.form10.State.value =("1");
			document.form10.submit();
		}
	}
}

function ChangeProductSelect(value) {
	if (value=="")
	{
		return false;
	}
	else
	{
		var arrSelection;
		var intType;
		var strURL;

		arrSelection = value.split(',');
		intType 	= arrSelection[0];
		strURL		= arrSelection[1];
		if (intType == 0)
		{
			//Outside product
			window.open('http://' + strURL);
		}
		else if (intStatus == 1)
		{
			//Local page product not used yet...
			window.location = '/' + strURL;
		}
	}
}

function checkSearchForm()
	{
			if (document.Searchform.keyword.value.length == 0)
			{
				alert ("You didn't fill in a search string.")
				return;
			}
			document.Searchform.submit()
	}
function CheckSelect(countryid)	{
		if (countryid.length > 0) {
			document.form1.submit()
		}
	}

function CheckSelect3(countryid) {
		if (countryid.length >0) {
			document.form10.submit()
		}
	}
function CheckSelect2(countryid2)	{
		if (countryid2.length > 0) {
			document.form2.submit()
		}
	}