
var version4 = (navigator.appVersion.charAt(0) == "4");

var popupHandle;

function closePopup() {

if(popupHandle != null && !popupHandle.closed) popupHandle.close()

}



function displayPopup(position,url,name,height,width,evnt)

{

var properties = "toolbar=0,location=0,resizable=no,scrollbars=no,height="+height

properties = properties+",width="+width



var leftprop, topprop, screenX, screenY, cursorX, cursorY, padAmt



if(navigator.appName == "Microsoft Internet Explorer")

{

	screenY = document.body.offsetHeight

	screenX = window.screen.availWidth

}

else

{ // Navigator coordinates

//		screenY = window.outerHeight

//		screenX = window.outerWidth

	

		screenY = screen.height;

		screenX = screen.width;

}



if(position == 2)

{

	leftvar = (screenX - width) / 2

	rightvar = ((screenY - height) / 2)+130

		

	if(navigator.appName == "Microsoft Internet Explorer")

	{

		leftprop = leftvar

		topprop = rightvar

	}

	else

	{ // adjust Netscape coordinates for scrolling

		leftprop = (leftvar - pageXOffset)

		topprop = (rightvar - pageYOffset)

	}

}



if(evnt != null)

{

properties = properties+",left="+leftprop

properties = properties+",top="+topprop

}

closePopup()

popupHandle = open(url,name,properties)

}



/*

Image preloading section

Added by Ian

*/



	var silverstone, brilliantwhite, bluishsilver, purplishblue, vividblue, nighthawkblack, heliosyellow, baseimage;

	

	baseimage = new Image;

	baseimage.src = 'images/models/jazz/jazz_heliosyellow.jpg';

	

	silverstone = new Image;

	silverstone.src = 'images/models/jazz/jazz_silverstone.jpg';

		

	brilliantwhite = new Image;

	brilliantwhite.src = 'images/models/jazz/jazz_brilliantwhite.jpg';

	

	bluishsilver = new Image;

	bluishsilver.src = 'images/models/jazz/jazz_bluishsilver.jpg';

	
	purplishblue = new Image;

	purplishblue.src = 'images/models/jazz/jazz_purplishblue.jpg';
	
		
	vividblue = new Image;

	vividblue.src = 'images/models/jazz/jazz_vividblue.jpg';
	
	
	nighthawkblack = new Image;

	nighthawkblack.src = 'images/models/jazz/jazz_nhblack.jpg';
	
	
	heliosyellow = new Image;

	heliosyellow.src = 'images/models/jazz/jazz_heliosyellow.jpg';
		

	

	function changeto_silverstone()

	{

		document.images["baseimage"].src = silverstone.src	

	}



	function changeto_brilliantwhite()

	{

		document.images["baseimage"].src = brilliantwhite.src	

	}



	function changeto_bluishsilver()

	{

		document.images["baseimage"].src = bluishsilver.src	

	}


	function changeto_purplishblue()

	{

		document.images["baseimage"].src = purplishblue.src	

	}
	
	
	function changeto_vividblue()

	{

		document.images["baseimage"].src = vividblue.src	

	}
	
	
	function changeto_nighthawkblack()

	{

		document.images["baseimage"].src = nighthawkblack.src	

	}
	
	
	function changeto_heliosyellow()

	{

		document.images["baseimage"].src = heliosyellow.src	

	}

	

	function mout()

	{

		document.images["baseimage"].src = baseimage.src

	}

