var current;

var browserType;

if (document.layers) {browserType = "nn4"}
if (document.all) {browserType = "ie"}
if (window.navigator.userAgent.toLowerCase().match("gecko")) {browserType= "gecko"}

function setStyle(p, classn) {
  //if (browserType == "gecko" )
  //   document.poppedLayer = eval('document.getElementById(\''+p+'\')');
  //else if (browserType == "ie")
  //   document.poppedLayer = eval('document.all[\''+p+'\']');
  //else
   //  document.poppedLayer = eval('document.layers[\''+p+'\']');

 document.getElementById(p).style.className = classn;
 // document.write(p+" "+classn+" "+document.getElementById(p));
  //document.poppedLayer.style.className = classn;
  
}

function preloadImages(p)
{
if (document.images) {
  var t, n; 
    var path = "images_fr/"; 
    for(var i=0;i<p.length;i++)
    {
       t = p[i];
       n = "img_"+t[0];
              
       this[n] = new Image();
       this[n].src = path+t[1]+".gif";
       this[n+"2"] = new Image();
       this[n+"2"].src = path+t[1]+"_roll.gif";
       this[n+"3"] = new Image();
       this[n+"3"].src = path+t[1]+"_cur.gif";
    }
  }
}

function roll_on(x) {
	if (current!=x) {
		if (document.images) {
			document.images[x].src = eval("img_" + x + "2.src");
			}
		}
	}

function roll_off(x) {
	if (current!=x) {
		if (document.images) {
			document.images[x].src = eval("img_" + x + ".src");
			}
		}
	}

function set_current(x){
	if (document.images) {
			document.images[current].src = eval("img_" + current + ".src");
			}
	if (document.images) {
			document.images[x].src = eval("img_" + x + "3.src");
			}
	current=x;	
	} 


function intro_roll_on() {
	if (document.getElementById) {
			document.getElementById('introID').style.visibility = "visible";}
	}

function intro_roll_off() {
	if (document.getElementById) {
		document.getElementById('introID').style.visibility = "hidden";}
	}
