function PopupCentrer(page,largeur,hauteur,options) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  var PopupCentrer=window.open(page,"PopupCentrer","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);PopupCentrer.focus();
}
 function addToFavorite(){
	 title = "Print Co"; 
  // Blogger - Replace with <$BlogItemTitle$> 
  // MovableType - Replace with <$MTEntryTitle$>

 url = "http://www.printco.fr";

	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); }
	else if(window.opera && window.print) { // Opera Hotlist
		return true; }
 
}
ready=false;
function start()
{
	Tdiv = new Array;
	for(i=1; i<5; i++){
		eval ("Tdiv["+i+"]=(document.all)?document.all.subNavbar"+i+".style:(document.layers)?document.subNavbar"+i+":document.getElementById(\"subNavbar"+i+"\").style;");
	}
	Tobjima = new Array("",(document.layers)?document.subNavbar1.document:document,(document.layers)?document.subNavbar2.document:document,(document.layers)?document.subNavbar3.document:document,(document.layers)?document.subNavbar4.document:document);
	cpt=4;
	xor=false;
	encour=false;
	etat=false;
	posdiv();
	ready=true;
}
var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;
function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

function posdiv(){
   maxX  = (document.all)?window.document.body.clientWidth:window.innerWidth;
   maxH  = (document.all)?window.document.body.clientHeight:window.innerHeight;
    if (checkIt('msie')){
	 maxX+=20;
	Left=(maxX-984)/2;
  	Tdiv[1].left=(Left)+238;
	Tdiv[2].left=(Left)+395;
	Tdiv[3].left=(Left)+505;
	Tdiv[4].left=(Left)+649;
	 } else if (checkIt('safari')){
	 maxX+=0;
	Left=(maxX-984)/2;
  	Tdiv[1].left=(Left)+239;
	Tdiv[2].left=(Left)+394;
	Tdiv[3].left=(Left)+504;
	Tdiv[4].left=(Left)+648;
	 } else {
	Left=(maxX-984)/2;
  	Tdiv[1].left=(Left)+240;
	Tdiv[2].left=(Left)+396;
	Tdiv[3].left=(Left)+506;
	Tdiv[4].left=(Left)+650;
	}

   Top=38;
   Top=(Top<=39)?39:Top;
 	Tdiv[1].top=(Top);
 	Tdiv[2].top=(Top);
 	Tdiv[3].top=(Top);
 	Tdiv[4].top=(Top);
}

function IS(m,n,o) {
	if (o=='on') etat=true;
	else etat=false;
	fix();
	eval("Tobjima["+m+"].tt"+m+n+".src = titre"+m+o+n+".src");
}
function show(n,o){
	if (ready){
		fix();
		for(i=1; i<5; i++){
			Tdiv[i].visibility='hidden';
		}
		if (n){
			etat=true;
			Tdiv[n].visibility='visible';
			decpt();
		}
	}
}
function showVisite(f){
	if (ready){
		if (f){
			etat=true;
			Tdiv[f].visibility='visible';
		}
	}
}
function funcoff(){
etat=false;
}
function fix(){
	cpt=5;
}
function decpt(xor){
	if (!encour || xor){
		encour=true;
		cpt--;
		if (cpt<=0 && !etat){
			show();
			encour=false;
		}
		else if (etat) {
			fix();
			setTimeout('decpt(1)',100);
		}
		else setTimeout('decpt(1)',100);
	}
}

//window.onresize = function (e) {history.go(0);};
onresize=posdiv
function hope(){
	chemform =document.frmsites.sites[document.frmsites.sites.selectedIndex];
	aff=chemform.value;
	if (aff){
	//alert (aff);
	window.open(aff);
	}
}
function isEmail(elm) {
        if (elm.value.indexOf(" ") + "" == "-1"
         && elm.value.indexOf("@") + "" != "-1"
         && (elm.value.lastIndexOf(".") > elm.value.indexOf("@"))
         && elm.value != "")
            return true;
        else
            return false;
}

function isEmpty(elm) {
           var elmstr = elm.value + "";
           if (elmstr.length == 0) return true;
           return false;
}

function popnav(x,y,z,a,b){ 
	eval("document."+b+"=window.open('"+x+"','"+b+"','width="+y+",height="+z+",top=10,left=10,resizable=0,toolbar=0,scrollbars="+a+",status=0,menubar=0')");
	//this.blur();
	eval("document."+b+".focus()");
}

