var popUpWindow = null;
var wndopen = false;
var browserName = navigator.appName;


function F_imgSwap(vIS_Name, vIS_link, vIS_State, vIS_Ender)
{
	if (document.images){
		document.images[vIS_Name].src = "" + vIS_link + vIS_Name + vIS_State + vIS_Ender;
	}
}


function OpenWin(vTemp)
{
	// Open a window
	vWidth = 528;
	vHeight = 555;
	
	if (vTemp == "no")
	{
		vPopLink = "popups/whycarmarks.html";
	} else {
		vPopLink = "../popups/whycarmarks.html";
	}
	
	aWindow = window.open( vPopLink,'why','width=' + vWidth + ', height=' + vHeight + ', toolbar=no, directories=no, status=no, scrollbars=no, resize=no, menubar=no, left=' + ((screen.width / 2) - (vWidth / 2)) + ', top=' +  ((screen.height / 2) - (vHeight / 2)));
}


function ViewPlate()
{
	// Open a window
	vWidth = 500;
	vHeight = 400;

	vPopLink = "../popups/number_plate.html";
	
	bWindow = window.open( vPopLink,'plate','width=' + vWidth + ', height=' + vHeight + ', toolbar=no, directories=no, status=no, scrollbars=no, resize=no, menubar=no, left=' + ((screen.width / 2) - (vWidth / 2)) + ', top=' +  ((screen.height / 2) - (vHeight / 2)));
}


function doPopup(urlName)
{
	if(browserName=="Netscape")
		{ 
		if(popUpWindow && popUpWindow.exists) popUpWindow.close;
		
		popUpWindow = window.open(urlName, 'NewWindow', 'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=700,height=600,screenX=0,screenY=0');
		wndopen = true;
		popUpWindow.focus();
		}
	else
		{
		if(wndopen) popUpWindow.close();
		popUpWindow = window.open(urlName, 'NewWindow', 'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=700,height=600');
		wndopen = true;
		}
}