/*
###############################################################################
# Script : Biblio.JS - dernière modification : 17/02/2003
# -----------------------------------------------------------------------------
# Script Réalisé par Martin DUBUC , Modifié et complété par Olivier Audegond
# Mail    : dubucm@wawawoom.com || audegond@hotmail.com
# Version : 0.5
# But : Bibliotheque de fonction pour les sites clients e-photographe.com
# COPYRIGHT 2001-2002 e-photographe.com
# Reproductions partielles ou totales interdites en dehors de e-photographe.com
###############################################################################
*/
function SetStatus(compte,option) {
if (option) window.defaultStatus="copyright "+compte+" | site réalisé par e-Photographe.com";
else window.defaultStatus="copyright "+compte;
}
function WriteStats(compte) {
document.write("<script language=\"JavaScript\" src=\"http://www.e-photographe.com/script/userStats/write_logs.php?table="+compte+"\"></script>");

}
function CheckScreen() {
myConfigEcran = 800600;
myConfigEcranTexte = "800x600";
myConfigColor = 16;
myConfigColorTexte = "65536 couleurs et plus";
nav = navigator.appName.substring(0,3);
ver = navigator.appVersion.substring(0,1);
NavVersion = nav + ver;
if (ver >= 4)
	{
	TailleEcran = screen.width + "" + screen.height;
	ColorNB = screen.colorDepth;
	}
else
	{
	TailleEcran = "indef";
	ColorNB = "indef"
	}
tempMess="";
verif = "ok";
if (TailleEcran != "indef")
	{
	if (TailleEcran < myConfigEcran) {
		verif = "no";
		tempMess+=" La résolution minimale conseillée pour ce site est 800x600.\n\n";
		}
	if (ColorNB < myConfigColor) {
		verif = "no";
  	    tempMess+=" Nous recommandons l'usage de 65 000 couleurs au minimum dans vos paramètres d'affichage pour visionner ce site.\n\n";
		}
	}
else
	{
	verif ="no";
	}
if (verif == "no")
	{
	alert(tempMess);
	}
}

function RandomString() {
  today = new Date();
  num= Math.random(today.getTime())*100;
  RandomString = num.toString();
  RandomString=RandomString.split('.');
  return RandomString[1];  
}

function  CallSwf(url,width,height,background,quality) {
var  uniqString=RandomString();
if (!quality) {
quality="high";
}
var tempMess="";
tempMess+="<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\n";
tempMess+=" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\"\n";
tempMess+=" WIDTH="+width+" HEIGHT="+height+" id=\"pilote\">\n";
tempMess+="<PARAM NAME=movie VALUE="+url+"?uniq="+uniqString+">\n";
tempMess+="<PARAM NAME=quality VALUE="+quality+">\n";
tempMess+="<PARAM NAME=bgcolor VALUE="+background+">\n";
tempMess+="<PARAM NAME=scale VALUE=\"noborder\">\n";
tempMess+="<PARAM NAME=menu VALUE=\"false\">\n";
tempMess+="<EMBED src="+url+"?uniq="+uniqString+"\n";
tempMess+="quality="+quality+"\n";
tempMess+="bgcolor="+background+"\n";
tempMess+="WIDTH="+width+ " HEIGHT="+height+ " NAME=pilote scale=noborder swLiveConnect=true\n"; 
tempMess+="TYPE=\"application/x-shockwave-flash\"\n";
tempMess+="PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\">\n";
tempMess+="</EMBED>\n";
tempMess+="</OBJECT>\n";
document.write(tempMess);
}


function BuildPage(designID) {
// CONFIGURATION 
// --------------
// dInfo est un tableau regroupant toutes les infos concernant les designs
// cela permet de customiser les attribus de la page suivant le design.
// Le Body BgType => 0 ou 1 
// Si 1 c est une image si 0 => c est une couleur
// DESIGN NUMERO 1
// ---------------
dInfo=new Array();
// 0 correspond a un site non construit.
dInfo[0]=new Array();
dInfo[0]['flashBg']="#F8F8F8";
dInfo[0]['flashWidth']="400";
dInfo[0]['flashHeight']="150";
dInfo[0]['flashBorder']="1";
dInfo[0]['flashBorderColor']="#F8B34F";
dInfo[0]['bodyBgType']="1";
// 1 => SKIN PhotoFuture ( standard )
dInfo[1]=new Array();
dInfo[1]['flashBg']="#FFFFFF";
dInfo[1]['flashWidth']="700";
dInfo[1]['flashHeight']="480";
dInfo[1]['flashBorder']="1";
dInfo[1]['flashBorderColor']="silver";
dInfo[1]['bodyBgType']="1";
//dInfo[0]['bodyBgColor']="#0000000";

// 2 => SKIN Corporate Gris

dInfo[2]=new Array();
dInfo[2]['flashBg']="#FFFFFF";
dInfo[2]['flashWidth']="760";
dInfo[2]['flashHeight']="430";
dInfo[2]['flashBorder']="1";
dInfo[2]['flashBorderColor']="black";
dInfo[2]['bodyBgType']="0";
dInfo[2]['bodyBgColor']="#FFFFFF";



// 3 => SKIN Pix bleu
dInfo[3]=new Array();
dInfo[3]['flashBg']="#ffffff";
dInfo[3]['flashWidth']="760";
dInfo[3]['flashHeight']="430";
dInfo[3]['flashBorder']="1";
dInfo[3]['flashBorderColor']="black";
dInfo[3]['bodyBgType']="1";
dInfo[3]['bodyBgColor']="#FFFFFF";

// 4 => SKIN Scratch Art
dInfo[4]=new Array();
dInfo[4]['flashBg']="#ffffff";
dInfo[4]['flashWidth']="570";
dInfo[4]['flashHeight']="350";
dInfo[4]['flashBorder']="1";
dInfo[4]['flashBorderColor']="white";
dInfo[4]['bodyBgType']="0";
dInfo[4]['bodyBgColor']="#FFFFFF";


// 5=> SKIN DAFFY BLUE
dInfo[5]=new Array();
dInfo[5]['flashBg']="#000000";
dInfo[5]['flashWidth']="780";
dInfo[5]['flashHeight']="450";
dInfo[5]['flashBorder']="0";
dInfo[5]['flashBorderColor']="white";
dInfo[5]['bodyBgType']="0";
dInfo[5]['bodyBgColor']="#000000";


//

if (dInfo[designID]['bodyBgType']==1) {
document.write("<BODY topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>");
document.write("<TABLE width=\"100%\" height=\"100%\" cellpadding=\"0\" cellspacing=\"0\" background=\"background.gif\">");
}
else {
document.write("<BODY bgcolor="+dInfo[designID]['bodyBgColor']+" topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>");
document.write("<TABLE width=\"100%\" height=\"100%\" cellpadding=\"0\" cellspacing=\"0\">");
}
document.write("<TR>");
document.write("<TD align=center valign=middle>");
document.write("<TABLE width="+dInfo[designID]['flashWidth']+" height="+dInfo[designID]['flashHeight']+" cellpadding=\"0\" cellspacing="+dInfo[designID]['flashBorder']+" bgcolor="+dInfo[designID]['flashBorderColor']+">");
document.write("<TR>");
document.write("<TD width="+dInfo[designID]['flashWidth']+" height="+dInfo[designID]['flashHeight']+" bgcolor="+dInfo[designID]['flashBg']+" align=center valign=middle>");
if (designID != 0) {
CallSwf("files/flash/pilote.swf",dInfo[designID]['flashWidth'],dInfo[designID]['flashHeight'],dInfo[designID]['flashBg'],"high");
}
else {
document.write("Mon site est actuellement en cours de construction");
}
document.write("</TD>");
document.write("</TR>");
document.write("</TABLE>");
document.write("</TD>");
document.write("</TR>");
document.write("</TABLE>");
document.write("</BODY>");
// FIN DE L ECRITURE DU HTML
CheckScreen();

}

