function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}


function popup(URL) {
window.open("http://www.maserati.com")
}



function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		navi_dealer_over = newImage("images/navi_dealer-over.gif");
		navi_preowned_over = newImage("images/navi_preowned-over.gif");
		navi_aftersales_over = newImage("images/navi_aftersales-over.gif");
		navi_services_over = newImage("images/navi_services-over.gif");
		navi_cars_over = newImage("images/navi_cars-over.gif");
		navi_newsevents_over = newImage("images/navi_newsevents-over.gif");
		navi_merchandise_over = newImage("images/navi_merchandise-over.gif");
		bottom_navi_1_over = newImage("images/bottom_navi_1-over.gif");
		bottom_navi_2_over = newImage("images/bottom_navi_2-over.gif");
		bottom_navi_3_over = newImage("images/bottom_navi_3-over.gif");
		preloadFlag = true;
	}
}

function PageHeader(p_divId) { 
	document.getElementById(p_divId).style.zIndex=11; 
}

function utility() {
	if (document.getElementById('ShowLinks').style.visibility=='hidden') {
		document.getElementById('ShowLinks').style.visibility='visible';
	} 
	else {
		document.getElementById('ShowLinks').style.visibility='hidden';
	}
}

function image(name) { 
popup = window.open("about:blank","_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=450,height=450,left=0,top=0"); 
popup.document.write('<html><head><TITLE>Maserati</TITLE></head>');
popup.document.write('<body bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">');
popup.document.write('<img src="/common_files/maserati2004/graphics/'+name+'_big.jpg" alt="" width="450" height="450" border="0">');
popup.document.write('</body></html>');
popup.focus();
}

function imagecontent(name) { 
popup = window.open("about:blank","_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=450,height=450,left=0,top=0"); 
popup.document.write('<html><head><TITLE>Maserati</TITLE></head>');
popup.document.write('<body bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">');
if(document.images[name].src.indexOf("thumb")>0){
	popup.document.write('<img src="graphics/'+name+'.jpg" alt="" width="450" onLoad="window.resizeTo(this.width,this.height+50)" border="0">');
}else{
	popup.document.write('<img src="/common_files/maserati2004/graphics/'+name+'_big.jpg" alt="" width="450"  border="0" onLoad="window.resizeTo(this.width,this.height+50)">');
}
popup.document.write('</body></html>');
popup.focus();
//popup.resizeTo(popup.document.images[0].width,popup.document.images[0].height+20)
}



function imagecontentother(template,name) { 
popup = window.open("about:blank","_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=450,height=450,left=0,top=0"); 
popup.document.write('<html><head><TITLE>Maserati</TITLE></head>');
popup.document.write('<body bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">');
popup.document.write('<img src="'+template+'/'+name+'.jpg" alt="" width="450" onLoad="window.resizeTo(this.width,this.height+50)" border="0">');

popup.document.write('</body></html>');
popup.focus();
//popup.resizeTo(popup.document.images[0].width,popup.document.images[0].height+20)
}



function image2(name) { 
popup = window.open("about:blank","_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=450,height=450,left=0,top=0"); 
popup.document.write('<html><head><TITLE>Maserati</TITLE></head>');
popup.document.write('<body bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">');
popup.document.write('<img src="'+name+'" alt=""  border="0" onLoad="window.resizeTo(document.images[0].width,document.images[0].height+50)">');
popup.document.write('</body></html>');
popup.focus();
//popup.resizeTo(popup.document.images[0].width,popup.document.images[0].height+20)
}

function init() { return true; }
