 var brVer = navigator.userAgent; 
 var arVersion = navigator.appVersion.split("MSIE");
 var version = parseFloat(arVersion[1]);
 var tobj, tobj1;
 
function imgSwap(oImg)  {
   var strOver  = "_on"    // image to be used with mouse over
   var strOff = "_off"     // normal image
   var strImg = oImg.src
   if (strImg.indexOf(strOver) != -1) oImg.src = strImg.replace(strOver,strOff)
     else oImg.src = strImg.replace(strOff,strOver)
}
  
function GetMail(Ctrl, Address, Domain, Tld) {
	window.location = "mailto:" + Address + '@' + Domain + '.' + Tld;
}

function getCookie(name) {
		var dc = document.cookie;
		var prefix = name + "=";
		var begin = dc.indexOf("; " + prefix);
		if (begin == -1) {
			begin = dc.indexOf(prefix);
			if (begin != 0) return null;
		} else {
			begin += 2;
		}
		var end = document.cookie.indexOf(";", begin);
		if (end == -1) {
			end = dc.length;
		}
		return unescape(dc.substring(begin + prefix.length, end));
	}

function setCookie(name, value, expires, path, domain, secure) {
		document.cookie= name + "=" + escape(value) +
			((expires) ? "; expires=" + expires.toGMTString() : "") +
			((path) ? "; path=" + path : "") +
			((domain) ? "; domain=" + domain : "") +
			((secure) ? "; secure" : "");
	}


function getWindowHeight()
	{
		if( typeof window.innerHeight == 'number' )
		{
			var winH = window.innerHeight;
			if( window.scrollMaxX > 0 )
			{
				winH -= 17;
			}
			return winH;
		}
		else if ( document.documentElement.clientHeight)
		{
			return document.documentElement.clientHeight;
		}
		else if( typeof document.body.clientHeight == 'number' )
		{
			return document.body.clientHeight;
		}
	}
	function getWindowWidth()
	{
		if( typeof window.innerWidth == 'number' )
		{
			var winW = window.innerWidth;
			if( window.scrollMaxY > 0 )
			{
				winW -= 17;
			}
			return winW;
		}
		else if ( document.documentElement.clientWidth )
		{
			return document.documentElement.clientWidth;
		}
		else if( document.body && document.body.clientWidth )
		{
			return document.body.clientWidth;
		}
	}
	function getScrollLeft()
	{
		var posLeft = false;
		
		if( is_Netscape )
		{
			posLeft = window.pageXOffset;
		}
		else if( document.documentElement && document.documentElement.scrollTop )
		{
			posLeft = document.documentElement.scrollLeft;
		}
		else if( is_Body )
		{
			posLeft = document.body.scrollLeft;
		}
		
		return typeof posLeft == 'number' ? posLeft : 0;
	}
	function getScrollTop()
	{
		var posTop = false;
		
		if (window.innerHeight)
		{
			posTop = window.pageYOffset;
		}
		else if( document.documentElement && document.documentElement.scrollTop )
		{
			posTop = document.documentElement.scrollTop;
		}
		else if( is_Body )
		{
			posTop = document.body.scrollTop;
		}
		
		return typeof posTop == 'number' ? posTop : 0;
	}
	function loadEasyWindow()
	{
		var windowEasy = document.getElementById( 'windowEasyAlert' );
		var pos = parseInt( windowEasy.style.top );
		if( pos > 0 )
		{
			windowEasy.style.top = ( pos - 5 ) + 'px';
			setTimeout( 'loadEasyWindow()', 30 );
		}
	}
	function positionEasyWindow()
	{
		divBG = document.getElementById( 'windowEasyAlertBackground' );
		divBG.style.top = ( getScrollTop() + getWindowHeight() - ewH ) + 'px';
		divBG.style.left = ( getScrollLeft() + getWindowWidth() - ewW - 10 ) + 'px';	
		divBG = document.getElementById( 'windowEasyAlertBackground1' );
		divBG.style.top = ( getScrollTop() + getWindowHeight() - ewH ) + 'px';
		divBG.style.left = ( getScrollLeft() + getWindowWidth() - ewW1 - 10 ) + 'px';	
		ewTime = setTimeout( "positionEasyWindow()", 100 );	
	}

	// cookies
	function getCookie( name )
	{
		var cookieLen = name.length;
		var cookieData = document.cookie;
		var allcookieLen = cookieData.length;
		
		var i = 0;
		var cookieEnd;
		
		while( i < allcookieLen )
		{
			var j = i + cookieLen;
			if( cookieData.substring( i, j ) == name )
			{
				cookieEnd = cookieData.indexOf( ";", j );
				if( cookieEnd == -1 )
				{
					cookieEnd = cookieData.length;
				}
				return unescape( cookieData.substring( j + 1, cookieEnd ) );
			}
			i++;
		}
		return 0;
	}
	function addOnLoadEvent( func )
	{
		if( typeof window.onload != 'function' )
		{
			window.onload = func;
		}
		else
		{
			var oldOnload = window.onload;
			window.onload = function()
			{
				oldOnload();
				func();
			}
		}
	}
	function loadEasyWindowNow()
		{
			positionEasyWindow();	
						loadEasyWindow();			
		}
	function scroll1()  {
	document.cookie = ewCookie + '=' + ( parseInt( getCookie( ewCookie ) ) + 1 );
	if( getCookie( ewCookie ) <= 0 || 0 == 0 )
	{	
		document.write( '<style type="text/css">#windowEasyAlertBackground, #windowEasyAlertBackground1, #windowEasyAlert{width:150px;height:650px;}</style>' );

		
		document.write( divUser );
		addOnLoadEvent(
			function()
			{
				setTimeout( 'loadEasyWindowNow()', 0 * 0 );
			}
		);
	}   }
	
	
	var indAcc = new Array(0,0,0,0);
	var maxArrAcc = 33;
	var arrAccImages = new Array(34);
	var arrAccLinks  = new Array(34);
	arrAccImages[1] = "animaux/pca0317_lavache.jpg";
	arrAccLinks[1] = "Animaux.html";
	arrAccImages[2] = "animaux/pca2193_roi_lion.jpg";
	arrAccLinks[2] = "Animaux.html";
	arrAccImages[3] = "animaux/pca2477_lechouille.jpg";
	arrAccLinks[3] = "Animaux.html";

    arrAccImages[4] = "art_abstrait/pca2344_porsche_speed.jpg";
	arrAccLinks[4] = "Art_Abstrait.html";
	arrAccImages[5] = "art_abstrait/pca2346_porsche_lemans600.jpg";
	arrAccLinks[5] = "Art_Abstrait.html";
	arrAccImages[6] = "art_abstrait/pca2349_dessin_porsche.jpg";
	arrAccLinks[6] = "Art_Abstrait.html";

    arrAccImages[7] = "cinema/pca0095_terminator3_t800.jpg";
	arrAccLinks[7] = "Cinema_TV.html";
	arrAccImages[8] = "cinema/pca0356_angelina_jolie.jpg";
	arrAccLinks[8] = "Cinema_TV.html";
	arrAccImages[9] = "cinema/pca1097_300.jpg";
	arrAccLinks[9] = "Cinema_TV.html";

    arrAccImages[10] = "dessin/pca0213_urbanterror.jpg";
	arrAccLinks[10] = "Dessin_BD.html";
	arrAccImages[11] = "dessin/pca1282_femme_dragon.jpg";
	arrAccLinks[11] = "Dessin_BD.html";
	arrAccImages[12] = "dessin/pca1451_titi.jpg";
	arrAccLinks[12] = "Dessin_BD.html";

    arrAccImages[13] = "divers/pca0516_ck1.jpg";
	arrAccLinks[13] = "Divers.html";
	arrAccImages[14] = "divers/pca0674_noel.jpg";
	arrAccLinks[14] = "Divers.html";
	arrAccImages[15] = "divers/pca1555_reve_humide.jpg";
	arrAccLinks[15] = "Divers.html";

    arrAccImages[16] = "informatique/pca0049_hercules_9700_2.jpg";
	arrAccLinks[16] = "Informatique.html";
	arrAccImages[17] = "informatique/pca0352_we_suck_more_s.jpg";
	arrAccLinks[17] = "Informatique.html";
	arrAccImages[18] = "informatique/pca1319_superman.jpg";
	arrAccLinks[18] = "Informatique.html";

    arrAccImages[19] = "jeux/pca0596_guild_wars.jpg";
	arrAccLinks[19] = "Jeux_video.html";
	arrAccImages[20] = "jeux/pca1360_all_stars.jpg";
	arrAccLinks[20] = "Jeux_video.html";
	arrAccImages[21] = "jeux/pca1380_ghost_in_shell.jpg";
	arrAccLinks[21] = "Jeux_video.html";

    arrAccImages[22] = "paysage/pca0455_la_vie.jpg";
	arrAccLinks[22] = "Paysage.html";
	arrAccImages[23] = "paysage/pca0662_maison_blanche_neig.jpg";
	arrAccLinks[23] = "Paysage.html";
	arrAccImages[24] = "paysage/pca2136_lac_michigan.jpg";
	arrAccLinks[24] = "Paysage.html";

    arrAccImages[25] = "sport/pca0302_baseball_balle_feu.jpg";
	arrAccLinks[25] = "Sport.html";
	arrAccImages[26] = "sport/pca0303_escalade.jpg";
	arrAccLinks[26] = "Sport.html";
	arrAccImages[27] = "sport/pca0571_planchevoile.jpg";
	arrAccLinks[27] = "Sport.html";

    arrAccImages[28] = "stars/pca0889_penelope_cruz.jpg";
	arrAccLinks[28] = "Stars.html";
	arrAccImages[29] = "stars/pca1318_jennifer_love_hewit.jpg";
	arrAccLinks[29] = "Stars.html";
	arrAccImages[30] = "stars/pca2446_katherine_heigl.jpg";
	arrAccLinks[30] = "Stars.html";

    arrAccImages[31] = "transport/pca0135_avion.jpg";
	arrAccLinks[31] = "Transport.html";
	arrAccImages[32] = "transport/pca1657_navette_discovery.jpg";
	arrAccLinks[32] = "Transport.html";
	arrAccImages[33] = "transport/pca2350_porsche_356.jpg";
	arrAccLinks[33] = "Transport.html";

function randImageLinks() {
	  var tmp, j;
	  j = 1;
	  while (true) {
	   tmp = parseInt((Math.random()*maxArrAcc + 0.9999999));
	   if (j==1) { indAcc[1] = tmp; j++; } 
	    else if (j==2 && indAcc[1] != tmp) { indAcc[2] = tmp; j++; }
	    else if (j==3 && indAcc[1] != tmp && indAcc[2] != tmp) { indAcc[3] = tmp; break; }
	  }
	}	

  function writeRandom() {
    randImageLinks();
	document.write("arrAccImages[" + indAcc[1] + "] = " + arrAccImages[indAcc[1]] + "<br>");
	document.write("arrAccLinks[" + indAcc[1] + "] = " + arrAccLinks[indAcc[1]] + "<br>");
	document.write("arrAccImages[" + indAcc[2] + "] = " + arrAccImages[indAcc[2]] + "<br>");
	document.write("arrAccLinks[" + indAcc[2] + "] = " + arrAccLinks[indAcc[2]] + "<br>");
	document.write("arrAccImages[" + indAcc[3] + "] = " + arrAccImages[indAcc[3]] + "<br>");
	document.write("arrAccLinks[" + indAcc[3] + "] = " + arrAccLinks[indAcc[3]] + "<br>");
  }
  
 function fixFlash(s) { document.write(s); }


