
//Global variables
var over_checker;
var range = "";
var styleObj = "";
var quote = "";
var IE4 = (document.all) ? true : false;
var NS4 = (document.layers) ? true : false;
var N6 = (document.getElementById && !document.all) ? true : false;

if (IE4) {
	range = "all."
	styleObj = ".style" 
	} else if (N6) {
	range = "getElementById("
	styleObj = ").style"
	quote = "'"
}
function getObject(obj) {
	var theObj
	if (typeof obj == "string") {
		theObj = eval("document." + range + quote + obj + quote + styleObj)
	} else {
		theObj = obj
	}
	return theObj
}
function hide(obj) {
	var theObj = getObject(obj);
	theObj.visibility="hidden";
}
function show(obj) {
	var current_layer = getObject('lyr_aboutus');
	current_layer.visibility = "hidden";
	var theObj = getObject(obj);
	theObj.visibility="visible";
}		
function Off(pic) {
	if (NS4) {
		document.layers['nav'].document.images[pic].src=eval(pic + "Off.src");} else {
		document.images[pic].src=eval(pic + "Off.src");
	}
}
function On(pic) {
	if (NS4) {
	document.layers['nav'].document.images[pic].src=eval(pic + "On.src");} else {
	document.images[pic].src=eval(pic + "On.src");
	}
}
function openImage(img){
	foto1= new Image();
	foto1.src=(img);
	Controlla(img);
}
function Controlla(img){
	if((foto1.width!=0)&&(foto1.height!=0)){
		viewFoto(img);
	}
	else{
		funzione="Controlla('"+img+"')";
		intervallo=setTimeout(funzione,20);
	}
}
function viewFoto(img){
	largh=foto1.width+30;
	altez=foto1.height+50;
	stringa="width="+largh+",height="+altez+",resizable=1,status=1,menubar=0,scrollbars=1"
	finestra=window.open(img,"",stringa);
}
