
//function Javascript du tag Andreamedia
sas_tmstp=Math.round(Math.random()*10000000000);sas_masterflag=1;

function SmartAdServer(sas_pageid,sas_formatid,sas_target) {
	if (sas_masterflag==1) {sas_masterflag=0;sas_master='M';} else
	{sas_master='S';};
	document.write('<scr'+'ipt SRC="http://www.smartadserver.com/call/pubj/' +
	sas_pageid + '/' + sas_formatid + '/'+sas_master + '/' + sas_tmstp + '/' +
	escape(sas_target) + '?"></scr'+'ipt>');
}

//fin du tag Andreamedia


/*function show_banners(){
	
		//alert(banners)
	
	for (var i=0;i<8;i++){
		try{
			
		document.getElementById('banner'+i).style.display='block';
		//document.getElementById('banner'+i).style.display='none';
		}
		catch (e){
			
		}
		
		
	}
}

var banners=new Array();

function add_banner(content){
	banners[banners.length]=content;
}*/




function on_select_change_go_to_URL(select_id){
	var sel=document.getElementById(select_id).value;
	if (sel.length>2){
		
		window.location=sel;
	}

}



function validate_search_engine(i){

	var mot=document.getElementById('mot'+i).value;
	var a=mot.length;
	error='';
	if(mot.length<=0){
		error=error + 'Tapez un mot';
	}
	if (error.length>1){

		alert(error);
	}
	else {
		document.getElementById('fm'+i).submit();

	}
}


function autocomplete_email(text,id) {

	if(id==1){
		if (document.getElementById('fiche_mail').value == '')
		document.getElementById('fiche_mail').value=text;
	}
	else{
		if (document.getElementById('form_email').value == '')
		document.getElementById('form_email').value=text;
	}
}

function clear_email(text,id) {
	// on focus
	if(id==1){
		if (document.getElementById('fiche_mail').value == text)
		document.getElementById('fiche_mail').value='';
	}
	else{
		if (document.getElementById('form_email').value == text)
		document.getElementById('form_email').value='';

	}
}

function autocomplete_pass(text,id) {
	//on losefocus(blur)
	if(id==1){
		if (document.getElementById('fiche_pass').value== '')
		document.getElementById('fiche_pass').value=text;
	}
	else{

		if (document.getElementById('form_password').value== '')
		document.getElementById('form_password').value=text;
	}
}

function clear_pass(text,id) {
	// on focus
	if(id==1){

		if (document.getElementById('fiche_pass').value== text)
		document.getElementById('fiche_pass').value='';
	}
	else{

		if (document.getElementById('form_password').value== text)
		document.getElementById('form_password').value='';
	}
}


function isValidEmail(str) {


	return (str.indexOf(".") > -1) && (str.indexOf("@") > 0);



}



function preloadImages(img) { //v3.0
	ouah= new Image(100,25); 
	ouah.src=img; 
}



