/***********************
Acces BD PRODUITS      *
© Patrick ROUSSEL 2001 *
IE5+ et NS6 et GECKO   *
************************/


serveur =BD_PROD+"&-lay=Fiche"

function MakeReq(name,req,format) {
	this.name = name ; this.req = req ; this.format = format ; 
}
	
FMP = new Array(
	new MakeReq("mursInt","&Usage=mur&Int.Ext=Interieur&-sortfield=Nom&-find=","formatsAVANCE.htm"),
	new MakeReq("mursExt","&Usage=mur&Int.Ext=Exterieur&-sortfield=Nom&-find=","formatsAVANCE.htm"),
	new MakeReq("plafonds","&Usage=plafond&-sortfield=Nom&-find=","formatsAVANCE.htm"),
	new MakeReq("gazon","&Usage=Gazon&-sortfield=Nom&-find=","formatsAVANCE.htm"),


new MakeReq("PEINT","&Type=Peinture&-sortfield=Nom&-find=","formatsAVANCE.htm"),	
	new MakeReq("Pmat","&Type=peinture&Aspect=Mat&-sortfield=Nom&-find=","formatsAVANCE.htm"),
	new MakeReq("Psatin","&Type=peinture&Aspect=Satine&-sortfield=Nom&-find=","formatsAVANCE.htm"),
	new MakeReq("Pbrillant","&Type=peinture&Aspect=Demi-brillant&-sortfield=Nom&-find=","formatsAVANCE.htm"),

new MakeReq("RETI","&Nom=retisouple&-sortfield=Nom&-find=","formatsAVANCE.htm"),
	new MakeReq("RPSE","&Type=RPSE&-sortfield=Nom&-find=","formatsAVANCE.htm"),

new MakeReq("RPE","&Type=RPE&-sortfield=Nom&-find=","formatsAVANCE.htm"),	

new MakeReq("DECO","&Type=Decoration&-sortfield=Nom&-find=","formatsAVANCE.htm"),	
	new MakeReq("paille","&Type=Decoration&Aspect=Paillettes&-sortfield=Nom&-find=","formatsAVANCE.htm"),
	new MakeReq("cire","&Type=Decoration&Aspect=cire&-sortfield=Nom&-find=","formatsAVANCE.htm"),
	new MakeReq("ancien","&Type=Decoration&Aspect=Enduit%20a%20l%20ancienne&-sortfield=Nom&-find=","formatsAVANCE.htm"),
	new MakeReq("pate","&Type=Decoration&Aspect=Pate&-sortfield=Nom&-find=","formatsAVANCE.htm"),
	
new MakeReq("PREP","&Aspect=Preparation&-sortfield=Nom&-find=","formatsAVANCE.htm"),
	new MakeReq("impr","&Type=Fixateur&-sortfield=Nom&-find=","formatsAVANCE.htm"),
	new MakeReq("enduit","&Type=Enduit&-sortfield=Nom&-find=","formatsAVANCE.htm"),
	new MakeReq("decap","&Type=Decapant&-sortfield=Nom&-find=","formatsAVANCE.htm"),
	new MakeReq("anticrypt","&Type=Anticrypto&-sortfield=Nom&-find=","formatsAVANCE.htm"),
	new MakeReq("mastic","&Type=Mastic&-sortfield=Nom&-find=","formatsAVANCE.htm"),
	new MakeReq("vernis","&Type=Vernis&-sortfield=Nom&-find=","formatsAVANCE.htm"),


	new MakeReq("bidon","","")
);


function gprodFMP(group,max) {
			var URL=serveur+"&GProd="+group+"&-sortfield=Nom&-find=&max="+max+"&-format=formatsAVANCE.htm";
			window.open(URL,"zone1");
//			alert(URL)
}

function interroFMP(name,max) {
	for (i=0;i<FMP.length;i++) {
		if (FMP[i].name==name) {
			var URL=serveur+"&-max="+max+FMP[i].req+"&-format="+FMP[i].format;
			window.open(URL,"zone1");
//			alert(URL)
		}
	}
}



function rechercheFMP()
{
	var URL=serveur+"&-format="+LASSO+"searchAVANCE.htm&-view";
	window.open(URL,"zone1");
//	alert(URL);
}

function mailFMP()
{
	var FormMail = BD_PROD+"&-lay=FormWeb&-Max=1&-format=form.html&-findany"
	window.open(FormMail,"zone1");
//	alert(FormMail);
}


function getItem(nid,iframe) {
			var URL=serveur+"&Nom=&NiD="+nid+'&-find=&-format=formatsItem.htm';
			window.open(URL,iframe);
//			alert(URL);
		
}