// <script type="text/javascript" language="javascript" src="script.js"></script>

// MAIL_Var
var gau = "Art";
var gau2 = "Decor";
var dro = "tapisseriedefrance";
// go_fenetre(url) width=400,height=730,
function go_fenetre(url){
	fenetre = window.open(url,'fenetre','top=30,left=50,screenX=50,screenY=50,width=400,height=730,status=0,menubar=1,resizable=1,scrollbars=1');
}
// go_catalog(url) width=450,height=600,
function go_catalog(url){
	fenetre = window.open(url,'catalog','top=10,left=10,screenX=10,screenY=10,width=450,height=600,status=0,resizable=1,scrollbars=1');
}
// go_bag(url) width=665,height=600,
function go_bag(url){
	fenetre = window.open(url,'panneau','top=10,left=50,screenX=50,screenY=50,width=665,height=600,status=0,resizable=1,scrollbars=1');
}
// go_boutique(url)  width=500,height=770,
function go_boutique(url){
	fenetre = window.open(url,'boutique','top=10,left=10,screenX=10,screenY=10,width=500,height=770,status=0,resizable=1,scrollbars=1');
}
// go_panneau1(url) width=650,height=570,
function go_panneau1(url){
	fenetre = window.open(url,'panneau','top=10,left=50,screenX=50,screenY=50,width=650,height=570,status=0,resizable=1,scrollbars=1');
}
// go_panneau2(url) width=650,height=825,
function go_panneau2(url){
	fenetre = window.open(url,'panneau','top=10,left=50,screenX=50,screenY=50,width=650,height=825,status=0,resizable=1,scrollbars=1');
}
// go_panneau3(url) width=450,height=830,
function go_panneau3(url){
	fenetre = window.open(url,'panneau','top=10,left=50,screenX=50,screenY=50,width=450,height=830,status=0,resizable=1,scrollbars=1');
}
// DecToHexa(DecNb) degrade(dr,dg,db,fr,fg,fb,texte) 
var hexa = "0123465789ABCDEF";
function DecToHexa(DecNb){
	x = Math.floor(DecNb / 16);
	h = hexa.charAt(x);
	x = DecNb % 16;
	h += hexa.charAt(x);
	return h;
}
function Degrade(dr,dg,db,fr,fg,fb,texte){
	steps = texte.length;
	cr = dr; cg = dg; cb = db;
	sr = (fr - dr) / steps;
	sg = (fg - dg) / steps;
	sb = (fb - db) / steps;
	for (var x = 0; x <= steps; x++){
		document.write('<font color="#' + DecToHexa(cr) + DecToHexa(cg) + DecToHexa(cb) + '">');
		document.write(texte.charAt(x));
		document.write('</font>');
		cr += sr; cg += sg; cb += sb;
	}
}
// setClientSize()
function setClientSize(){
	// Position pixel element
	var BodyObject = document.getElementById('PosPixel');
	var current_width = BodyObject.offsetLeft;
	var current_height = BodyObject.offsetTop;
	//alert(current_width +'=='+  current_height);
	self.window.resizeTo(current_width + 20, current_height + 40);
}
// fin() (Close Windows)
function fin(){
	window.close();
}
// affiche(id,on) (Style)
function affiche(id,on){
	var elsty=null
		if (document.getElementById){
			elsty=document.getElementById(id).style;
		} 
		else if (document.all) {
			elsty=document.all[id].style;
		} 
		if(elsty){
			if (on==true) elsty.display="block";
			if (on==false) elsty.display="none";
		}
	}
// affiche2(id,on) (Style)
function affiche2(id,on) {
	var elsty = null;
	if (document.getElementById) {
		elsty = document.getElementById(id).style;
	}
	else if (document.all) {
		elsty = document.all[id].style;
	} 
	if (on==true){
		elsty.visibility="visible";
		elsty.display="block";
	}
	else{
		elsty.visibility="hidden";
		elsty.display="none";
	}
	//	(on=='on') ? elsty.display="block" : elsty.display="none";
}
// on(id)
function on(id) {
	if (document.getElementById) {
		id.style.display == "none"?id.style.display = "block":id.style.display = "none"; 
		return true;
	}
}
/** function on(idImg) {
	var imgSty = null;
		if (document.getElementById) {
			imgSty = document.getElementById(idImg).style;
		}
		else if (document.all) {
			imgSty = document.all[idImg].style;
		} 
	imgSty.display="none"?imgSty.display="block":imgSty.display="none"
}
*/
// setVisible(layName1,layName2,opt) (Swith Option Visibility)
function setVisible(layName1,layName2,opt){
	var opt1 =(opt == 1)? 'visible': 'hidden';
	var opt2 =(opt1 == 'visible')? 'hidden': 'visible';
	if(document.getElementById)document.getElementById(layName1).style.visibility=opt1;
	if(document.getElementById)document.getElementById(layName2).style.visibility=opt2;
	else if(document.layers)document.layers[layName1].visibility=opt1;
	else if(document.layers)document.layers[layName2].visibility=opt2;
	else if(document.all)document.all(layName1).style.visibility=opt1;
	else if(document.all)document.all(layName2).style.visibility=opt2;
}
// MouseOut(name) (Switch Image)

// SWITCH IMAGE  DATA
// Declaration Image Style Siege
var Tapisserie = new Image();
var modlxiiiOver = new Image();
var modlxivOver = new Image();
var modregOver = new Image();
var modlxvOver = new Image();
var modlxviOver = new Image();
var moddirOver = new Image();
var modempirOver = new Image();
var modrestOver = new Image();
var modnapOver = new Image();
var modartdOver = new Image();
// Load Image Style Siege
Tapisserie.src = "common/chateaux.jpg";
modlxiiiOver.src = "common/modlxiii.gif";
modlxivOver.src = "common/modlxiv.gif";
modregOver.src = "common/modreg.gif";
modlxvOver.src = "common/modlxvb.gif";
modlxviOver.src = "common/modlxvi.gif";
moddirOver.src = "common/moddir.gif";
modempirOver.src = "common/modempir.gif";
modrestOver.src = "common/modrestaur.gif";
modnapOver.src = "common/modnap.gif";
modartdOver.src = "common/modartdeco.gif";
// Declaration Image Boutique
var boutique0 = new Image();
var boutique1 = new Image();
// Load Image Boutique
boutique0.src = "common/boutique.jpg";
boutique1.src = "common/boutique.jpg";
// MouseOver(name) (Switch)
function MouseOver(name){
	if (name == "modlxiii")document.Tapisserie.src = "common/modlxiii.gif";
	else if (name == "modlxiv")document.Tapisserie.src = "common/modlxiv.gif";
	else if (name == "modreg")document.Tapisserie.src = "common/modreg.gif";
	else if (name == "modlxv")document.Tapisserie.src = "common/modlxvb.gif";
	else if (name == "modlxvi")document.Tapisserie.src = "common/modlxvi.gif";
	else if (name == "moddir")document.Tapisserie.src = "common/moddir.gif";
	else if (name == "modempir")document.Tapisserie.src = "common/modempir.gif";
	else if (name == "modrest")document.Tapisserie.src = "common/modrestaur.gif";
	else if (name == "modnap")document.Tapisserie.src = "common/modnap.gif";
	else if (name == "modartd")document.Tapisserie.src = "common/modartdeco.gif";
	else if (name == "boutique0")document.boutique0.src = "common/boutique.jpg";
	else if (name == "boutique0")document.boutique0.src = "common/boutique.jpg";
}
// MouseOut(name) (Switch)
function MouseOut(name){
	if (name == "modlxiii")document.Tapisserie.src = "common/chateaux.jpg";
	else if (name == "modlxiv")document.Tapisserie.src = "common/chateaux.jpg";
	else if (name == "modreg")document.Tapisserie.src = "common/chateaux.jpg";
	else if (name == "modlxv")document.Tapisserie.src = "common/chateaux.jpg";
	else if (name == "modlxvi")document.Tapisserie.src = "common/chateaux.jpg";
	else if (name == "moddir")document.Tapisserie.src = "common/chateaux.jpg";
	else if (name == "modrest")document.Tapisserie.src = "common/chateaux.jpg";
	else if (name == "modempir")document.Tapisserie.src = "common/chateaux.jpg";
	else if (name == "modnap")document.Tapisserie.src = "common/chateaux.jpg";
	else if (name == "modartd")document.Tapisserie.src = "common/chateaux.jpg";
	else if (name == "boutique0")document.boutique0.src = "common/ab_clone.gif";
	else if (name == "boutique0")document.boutique0.src = "common/ab_clone.gif";
}
// 
// 
