
// --------------------------------------------------------------------------------
// ---
// --- jPow by Paolo Faccini
// --- http://www.PaoloFaccini.com
// ---
// --------------------------------------------------------------------------------

var IE = (navigator.appName.indexOf("Microsoft") != -1)? 1 : 0;

function pFlash(fn,x,y,vars,id){
	s='<div id="FlashCont"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
	s+='codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" ';
	s+='width="'+x+'" height="'+y+'" name="'+id+'" id="'+id+'" >';
    s+='<param name="movie" value="'+fn+'">';
    s+='<param name="quality" value="high">';
    s+='<param name="swliveconnect" value="true">';
	// s+='<param name="wmode" value="transparent">';
    s+='<param name="FlashVars" value="'+vars+'">';
    s+='<param name="SCALE" value="noborder">';
    s+='<embed ';
	// wmode=transparent
	s+='scale="noborder" name="'+id+'" id="'+id+'" ';
	s+='swliveconnect=true flashVars="'+vars+'" src="'+fn+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" ';
	s+='type="application/x-shockwave-flash" width="'+x+'" height="'+y+'"></embed>';
	s+='</object></div>';
	document.write(s);
}

	function pDillo(n){
		var cl = curLang;
		s = "http://www.monster.ducati.com/colourtherapy.jsp?lang="+cl.toLowerCase()+"&colour="+n;
		x = window.open(s,"DILLOaDUCATI","width=700,height=600");
		x.focus();
	}

	function pExtLinks(n){
		var cl = curLang;
		var s = "";
		var b = false;
		// ---		
		if (n==91){ s = "colour_therapy_it.html"; }
		if (n==92){ s = "colour_therapy_en.html"; }
		if (n==93){ s = "colour_therapy_fr.html"; }
		if (n==94){ s = "colour_therapy_de.html"; }
		if (n==95){ s = "colour_therapy_es.html"; }
		if (n==96){ s = "colour_therapy_jp.html"; }
		// ---
		if (n==200) { b = true; s = "http://www.youtube.com/watch?v=ke1Oau9tr6U"; }
		if (n==5){ b = true; s = "http://www.monsterartcontest.ducati.it/jspcontest/index.jsp" };
		// ---		
		if (cl=="IT"){ // Italiano
			// --- MM
			if (n==2){ b = true; s = "http://www.ducati.com/leadgenerator/contact.jsp?lng=it&reasonwhy=341" };
			if (n==3){ s = "http://www.monster.ducati.com/index.html" };
			// --- BM
			if (n==12){ b = true; s = "http://www.ducati.com" };
			if (n==13){ b = true; s = "http://www.ducati.com/dealerlocator/gm_countrySelected.jsp?lng=it&continentId=17&countryId=185&country=Italia" };
			if (n==14){ b = true; s = "http://www.ducati.com/docs_it/terms_of_use.jhtml" };
			if (n==15){ b = true; s = "http://www.ducati.com/docs_it/policy.jhtml" };
			// ---
		}else if (cl=="EN"){ // Inglese
			// --- MM
			if (n==2){ b = true; s = "http://www.ducati.com/leadgenerator/contact.jsp?lng=en&reasonwhy=341" };
			if (n==3){ s = "http://www.monster.ducati.com/index_en.html" };
			// --- BM
			if (n==12){ b = true; s = "http://www.ducati.com" };
			if (n==13){ b = true; s = "http://www.ducati.com/dealerlocator/gm_chooseCountry.jsp?lng=en" };
			if (n==14){ b = true; s = "http://www.ducati.com/docs_eng/terms_of_use.jhtml" };
			if (n==15){ b = true; s = "http://www.ducati.com/docs_eng/policy.jhtml" };
			// ---
		}else if (cl=="DE"){ // Tedesco
			// --- MM
			if (n==2){ b = true; s = "http://www.ducati.com/leadgenerator/contact.jsp?lng=de&reasonwhy=74" };
			if (n==3){ s = "http://www.monster.ducati.com/index_de.html" };
			// --- BM
			if (n==12){ b = true; s = "http://www.ducati.com" };
			if (n==13){ b = true; s = "http://www.ducati.com/dealerlocator/gm_chooseCountry.jsp?lng=de" };
			if (n==14){ b = true; s = "http://www.ducati.com/docs_eng/terms_of_use.jhtml" };
			if (n==15){ b = true; s = "http://www.ducati.com/docs_eng/policy.jhtml" };
			// ---
		}else if (cl=="ES"){ // Spagnolo
			// --- MM
			if (n==2){ b = true; s = "http://www.ducati.com/leadgenerator/contact.jsp?lng=es&reasonwhy=341" };
			if (n==3){ s = "http://www.monster.ducati.com/index_es.html" };
			// --- BM
			if (n==12){ b = true; s = "http://www.ducati.com" };
			if (n==13){ b = true; s = "http://www.ducati.com/dealerlocator/gm_chooseCountry.jsp?lng=es" };
			if (n==14){ b = true; s = "http://www.ducati.com/docs_eng/terms_of_use.jhtml" };
			if (n==15){ b = true; s = "http://www.ducati.com/docs_eng/policy.jhtml" };
			// ---
		}else if (cl=="FR"){ // Francese
			// --- MM
			if (n==2){ b = true; s = "http://www.ducati.com/leadgenerator/contact.jsp?lng=fr&reasonwhy=341" };
			if (n==3){ s = "http://www.monster.ducati.com/index_fr.html" };
			// --- BM
			if (n==12){ b = true; s = "http://www.ducati.com" };
			if (n==13){ b = true; s = "http://www.ducati.com/dealerlocator/gm_od_countrySelected.jsp?lng=fr&continentId=17&countryId=152&regionId=&country=France" };
			if (n==14){ b = true; s = "http://www.ducati.com/docs_eng/terms_of_use.jhtml" };
			if (n==15){ b = true; s = "http://www.ducati.com/docs_eng/policy.jhtml" };
			// ---
		}else if (cl=="JP"){ // Japanese
			// --- MM
			if (n==2) n = 13;
			if (n==3){ s = "http://www.monster.ducati.com/index_jp.html" };
			// --- BM
			if (n==12){ b = true; s = "http://www.ducati.com" };
			if (n==13){ b = true; s = "http://www.ducati.co.jp/dealer/" };
			if (n==14){ b = true; s = "http://www.ducati.com/docs_eng/terms_of_use.jhtml" };
			if (n==15){ b = true; s = "http://www.ducati.com/docs_eng/policy.jhtml" };
			// ---
		}
		if (b){
			x = window.open(s);
			x.focus();
		}else{
			location.href = s;
		}
	}

function pStats(url){
	url = "/stats/"+url.replace(" ","_")+".html";
	try {
	var pageTracker = _gat._getTracker("UA-93845-7");
	pageTracker._trackPageview(url);
	// alert("OK!\n"+url);
	} catch(err) { }	
}

function pMail(){
	location.href = "ma"+""+"il"+((1==2)?"http":"")+"to:"+"@"+""+"?Subject=[From Web]";
}

function pAlert(s){
	var f = document.forms[0];
	if (f.debug) f.debug.value = s+"\n"+f.debug.value;
}