/* ======================================================
   	 © Copyright 2009 Idealsite - Tous droits réservés. 
	 
	 ---------------------------------------------------
	 Dernière modification : le 18 Février 2009
====================================================== */



//Kit graphique template page de garde
var affInterfaceOptions = '&pr_code=0NP5b5mAJBTM7VbmK4GvklWl2qipUK&cols=2&rows=2';

function IncludeAffInterface(options,file){
	if(!file) file = 'pr_interface';
	options = affInterfaceOptions + (options ? '&'+options : '');
	document.write('<SCRIPT type="text/javascript" language="JavaScript" src="http://www.mytemplatestorage.com/codes/'+file+'.php?'+options+'"><'+'/SCRIPT>');
}


// Hide "www.mytemplatestorage.com" from status bar
function HideStatus(){
	window.status = document.readyState!="complete" ?
		"Loading..." : window.defaultStatus;
}
document.onreadystatechange = HideStatus;



//Heure dynamique
function HorlogeDynamique() {
	var DateActuel = new Date();
	var heure = DateActuel.getHours();
	var minutes = DateActuel.getMinutes();
	var secondes = DateActuel.getSeconds();

	if (heure == 0) {
		heure = "0" + heure;
		}
	if (minutes <= 9) {
		minutes = "0" + minutes;
		}
	if (secondes <= 9) {
		secondes = "0" + secondes;
		}
	
	Horloge = ""+ heure + ":" + minutes + ":" + secondes + "";
	

	if (document.getElementById) {
		document.getElementById("heure").innerHTML = Horloge;
		}

	if (document.layers) { 
    		document.clock.document.write("<br>&nbsp;&nbsp;"+Horloge); 
		document.clock.document.close(); 
  		}

	if ((document.all)&&(!document.getElementById)) { 
    		document.all["heure"].innerHTML = Horloge;
 		}

	setTimeout("HorlogeDynamique()", 1000)
	}
	
window.onload = HorlogeDynamique;

/* ===================================================================== */

//Compte à rebours
var temps = "0:12";
	if (document.images)
	{
		var parselimit = temps.split(":")
		parselimit = parselimit[0]*60+parselimit[1]*1
	}
	function compte()
	{
		if (!document.images) 
			return
		if (parselimit==1)
			window.document.decompteur.submit()
		else
		{ 
			parselimit-=1
			curmin=Math.floor(parselimit/60)
			cursec=parselimit%60
			if (curmin!=0) curtime=curmin+" : "+cursec
			else curtime=cursec
			window.document.compte_rebour.rebour.value=curtime
			setTimeout("compte()",1000)
		}
	}
	
/* ===================================================================== */	
//Infos trafic

function SubmitPage(oForm, strLanguage)
{
oForm.action = "";
if (oForm.rInfo[0].checked && oForm.selCountry.value == "BE")
oForm.action = "index.php";
else
if (oForm.rInfo[0].checked && oForm.selCountry.value == "FR")
oForm.action = (strLanguage == "NL" ? "verkeersinformatie-frankrijk.asp" : "infos-trafic-france.php");
else
if (oForm.rInfo[1].checked && oForm.selCountry.value == "BE")
oForm.action = (strLanguage == "NL" ? "verkeersvoorspellingen-belgie.asp" : "previsions-trafic-france.php");
else
if (oForm.rInfo[1].checked && oForm.selCountry.value == "FR")
oForm.action = (strLanguage == "NL" ? "verkeersvoorspellingen-frankrijk.asp" : "previsions-trafic-france.php");
if (oForm.action != "") oForm.submit();
}

/* ===================================================================== */	
<!-- moteur de recherche -->
function startsearch()
 {
	searchtxt = document.websearch.searchstr.value;
    searcheng = document.websearch.searchbot.options[document.websearch.searchbot.selectedIndex].value;
	if (searchtxt == "")
	 {
		alert("Veuillez taper au moins un mot de recherche.");
	}
	else { 
		if (searcheng == "annuaire")
		{ 
		searchbotstr ="http://www.idealsite.be/annuaire/search.php?mots=" + searchtxt; 
		}
		
		if (searcheng == "image")
		{ 
		searchbotstr = "http://images.google.be/images?hl=fr&q=" + searchtxt +"&btnG=Recherche+d%27images";
		}
		
		if (searcheng == "video")
		{
		 searchbotstr = "http://video.google.com/videosearch?q="  + searchtxt; 
		 }
		if (searcheng == "shopping")
		{
		 searchbotstr = "http://www.idealsite.be/shopping/index.php?s=" + searchtxt ; 
		 }
		if (searcheng == "web")
		{ 
		searchbotstr = "http://www.google.com/custom?q=" + searchtxt + "&sa=Google&client=pub-4775592856184413&forid=1&ie=ISO-8859-1&oe=ISO-8859-1&cof=GALT%3A%23008000%3BGL%3A1%3BDIV%3A%23336699%3BVLC%3A663399%3BAH%3Acenter%3BBGC%3AFFFFFF%3BLBGC%3A336699%3BALC%3A0000FF%3BLC%3A0000FF%3BT%3A000000%3BGFNT%3A0000FF%3BGIMP%3A0000FF%3BFORID%3A1%3B&hl=fr";
		 }	
		window.open(searchbotstr,"_blank");
	}
}


