var y;
function popup_contact(y)
{
var popcontact = window.open('contact.php?contact='+y,'','resizable=1,scrollbars=1,toolbar=0,location=0,height=550,width=700,top=30,left=30')
popcontact.focus();
}

var z;
function popup_site(z)
{
var popsite = window.open('http://'+z,'','resizable=1,scrollbars=1,toolbar=1,location=1,height=500,width=700,top=10,left=10');
popsite.focus();
}

var a=0;
function popup_fixe(a)
{
var popfixe = window.open(a,'','resizable=0,scrollbars=1,toolbar=0,location=0,height=500,width=500,top=10,left=10');
popfixe.focus();
}

function scroll_dynamique()
{
	scrollA();  
}

function valider() 
{
	document.newsletter.valider.value='Validation';
	document.newsletter.submit();
}

function valider_contact() 
{
	document.contact.valider.value='Validation';
	document.contact.submit();
}

function valider_envoi_ami() 
{
	document.ami.valider.value='Validation';
	document.ami.submit();
}

function valider_compte() 
{
	document.findpass.valider.value='Validation';
	document.findpass.submit();
}

function valider_forget_pass() 
{
	document.forget.valider.value='Validation';
	document.forget.submit();
}

function valider_modif_cpt() 
{
	document.ccc.valider.value='Validation';
	document.ccc.o.value='mc';
	document.ccc.submit();
}

function valider_acces_cpt() 
{
	document.cnx.valider_cnx.value='Validation';
	document.cnx.submit();
}

function valider_recherche() 
{
	document.moteur.moteur_interne.value='Validation';
	document.moteur.submit();
}

function recdepartement() 
{
	document.cat.rec_departement.value='1';
	document.cat.submit();
}

function recregion() 
{
	document.cat.rec_region.value='1';
	document.cat.submit();
}

function selectlieurecevoir() 
{
	document.recevoir.select_lieu.value='1';
	document.recevoir.submit();
}

function selectcat1() 
{
	document.categorie.select_cat1.value='1';
	document.categorie.action='proposer.php#cat';
	document.categorie.submit();
}

function selectcat2() 
{
	document.categorie.ajout_lcmd_cat.value='1';
	document.categorie.action='proposer.php#cat';
	document.categorie.submit();
}

var a;
function suplcmdcat(a) 
{
	document.categorie.sup_lcmd.value=a;
	document.categorie.action='proposer.php#cat';
	document.categorie.submit();
}

function selectlieu() 
{
	document.lieu.select_lieu.value='1';
	document.lieu.ajout_lcmd_loc.value='1';
	document.lieu.action='proposer.php#cat';
	document.lieu.submit();
}

function selectlieucheked() 
{
	document.lieu.select_lieu.value='1';
	document.lieu.action='proposer.php#cat';
	document.lieu.submit();
}

function selectlieuloc() 
{
	document.lieu.ajout_lcmd_loc.value='1';
	document.lieu.action='proposer.php#cat';
	document.lieu.submit();
}

var b;
function suplcmdlieu(b) 
{
	document.lieu.sup_lcmd.value=b;
	document.lieu.action='proposer.php#cat';
	document.lieu.submit();
}

function valide_detail() 
{
	document.annonce.ajout_detail_annonce.value='1';
	document.annonce.submit();
}

function valide_commande() 
{
	document.annonce.ajout_commande_annonce.value='1';
	document.annonce.submit();
}

function selectcat1dep() 
{
	document.departement.select_cat1.value='1';
	document.departement.submit();
}

function selectcat2dep() 
{
	document.departement.select_cat2.value='1';
	document.departement.submit();
}

function selectlieucarte() 
{
	document.departement.select_lieu.value='1';
	document.departement.submit();
}

function popup_imprime()
{
var popprint = window.open('print_annonce.php','printannonce','resizable=0,scrollbars=1,toolbar=0,location=0,height=500,width=650,top=10,left=10');
popprint.focus();
}

function autorisation_prelevement()
{
var popplv = window.open('autorisation_prelevement.pdf','autoplv','resizable=1,scrollbars=1,toolbar=0,location=0,height=500,width=650,top=10,left=10');
popplv.focus();
}

var c;
function popup_detail_annonce(c)
{
var popda = window.open('detail_annonce.php?id_annonce='+c,'detailannonce','resizable=0,scrollbars=1,toolbar=0,location=0,height=650,width=650,top=10,left=10');
popda.focus();
}

var cmd;
function popup_detail_commande(cmd)
{
var popdc = window.open('detail_commande.php?cmd='+cmd,'detailcommande','resizable=0,scrollbars=1,toolbar=0,location=0,height=650,width=650,top=10,left=10');
popdc.focus();
}

var mel_cmd;
var mel_loc;
var mel_cat;
function mel(mel_cmd, mel_loc, mel_cat) 
{
	document.cca.mel_cmd.value=mel_cmd;
	document.cca.mel_loc.value=mel_loc;
	document.cca.mel_cat.value=mel_cat;
	document.cca.mel.value=1;
	document.cca.o.value='a';
	document.cca.submit();
}

var e;
var f;
function supp_annonce(e, f) 
{
	document.cca.annonce.value=e;
	document.cca.type_annonce.value=f;
	document.cca.sup.value=1;
	document.cca.o.value='a';
	document.cca.submit();
}

var g;
function modif_commande(g) 
{
	document.cca.annonce.value=g;
	document.cca.modif.value=1;
	document.cca.o.value='i';
	document.cca.submit();
}

function msg_proposer()
{
alert('Pour trouver un service à domicile, veuillez sélectionner une catégorie sur le bandeau de droite.');
}

function msg_bientot()
{
alert('Service bientôt disponible.');
}

function msg_att()
{
alert('Aucune facture actuellement.');
}

function Is() {
   var agent = navigator.userAgent.toLowerCase();
   this.major = parseInt(navigator.appVersion);
   this.minor = parseFloat(navigator.appVersion);
   this.ns = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
   this.ns4 = (this.ns && (this.major >= 4));
   this.ns6 = (this.ns && (this.major >= 5));
   this.ie = (agent.indexOf("msie") != -1);
   this.ie4 = (this.ie && (this.major >= 4));
   this.ie5  = (this.ie && (agent.indexOf("msie 5")!=-1));
   this.op3 = (agent.indexOf("opera") != -1);
   this.win = (agent.indexOf("win")!=-1);
   this.mac = (agent.indexOf("mac")!=-1);
   this.unix = (agent.indexOf("x11")!=-1);
}
var is = new Is();

function addBookmark() {
   var titre = "AU SERVICE A DOMICILE - Tous les services de proximité";
   var url   = "http://www.au-service-a-domicile.fr/";
   if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) {
      window.sidebar.addPanel(titre, url, "");
   } else if (is.ie) {
      window.external.AddFavorite(url, titre);
   } else {
      alert("Pour ajouter 'titre' à  vos farovis, utilisez <CTRL>+D.");
   }
}
