/* ----- Browser language detection ----------------------------------------- */

function getLanguage() {
	if(navigator.browserLanguage)		{ lang = navigator.browserLanguage; }		// MS-DOM
 	else { if(navigator.language)		{ lang = navigator.language; } }		// W3C DOM
	if (lang.indexOf('en')!=-1)		{ lang='en'; }					// Cleaning of returned string for language
	else { if (lang.indexOf('fr')!=-1 )	{ lang='fr'; } 
		else 				{ lang='en'; } }
}

getLanguage();

/* ----- HTML Writing ------------------------------------------------------- */

function wMail(user,host) { document.write(user+' @'+host); }

/* ----- Open Window -------------------------------------------------------- */

function openWin(path,x,y,scroll)   {
	var lpath = path, lx = x, ly = y, lscroll;
	lscroll=(scroll)?"yes":"no";
	newWindow = window.open(lpath,"artwork","width=" + lx + ",height=" + ly + ",toolbar=no,scrollbars=" + lscroll + ",resizable=yes,status=no");
}

/* ----- Scroll navigation bar initialisation ------------------------------- */

scrolltimer = null;

/* ----- Netscape 4 refresh bug fix ----------------------------------------- */

function MM_reloadPage(init) {
  		if (init==true) with (navigator) {
  			if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    				document.MM_pgW=innerWidth;
    				document.MM_pgH=innerHeight;
    				onresize=MM_reloadPage;
    				}
    		}
  		else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
  			location.reload();
}

MM_reloadPage(true);

/* ----- Images preload ----------------------------------------------------- */

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

/* ----- ns4 var ----- */
ns4=(document.layers)?true:false;
