var defbtn="";
function menuInit(name) {
	if ((document.images)&&(name!="")) {
		document.images[name].src="img/"+name+"_f2.gif";
		defbtn=name;
	}
}
function menuOver(name) {
	if ((document.images)&&(name!=defbtn)) {
		document.images[name].src="img/"+name+"_f2.gif";
	}
}
function menuOut(name) {
	if ((document.images)&&(name!=defbtn)) {
		document.images[name].src="img/"+name+".gif";
	}
}
function winOpenImg(title,img,width,height) {
	msg=window.open("","msg","height="+height+",width="+width+",left=100,top=300,scrollbars=yes");
	msg.document.write("<html><title>"+title+"</title>");
	msg.document.write("<body bottommargin='0' topmargin='0' leftmargin='0' rightmargin='0' bgcolor='white'>");
	msg.document.write("<img src='../plans/"+img+"' border='1' onClick=window.close()>");
	msg.document.write("</body></html>");
}
function winOpenImg_2(title,img,width,height) {
	msg=window.open("","msg","height="+height+",width="+width+",left=100,top=300");
	msg.document.write("<html><title>"+title+"</title>");
	msg.document.write("<body bottommargin='0' topmargin='0' leftmargin='0' rightmargin='0' bgcolor='white'>");
	msg.document.write("<img src='../images/"+img+"' border='1' onClick=window.close()>");
	msg.document.write("</body></html>");
}
function inputVide(champ) {
    var obj=eval("document."+(champ));
    var val=obj.value;
    var err=(val=="");
    obj.className=(err)?"brdrouge":"";
    return err;
}
function inputNonEmail(champ) {
    var obj=eval("document."+(champ));
    var val=obj.value;
    var reg=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/;
    var err=0;
    if(!reg.test(val)){
        err++;
    }
    obj.className=(err)?"brdrouge":"";
    return err ;
}
function focusemail(src) {
    if (src.value=="E-mail") src.value = "";
}



