function checkBrowser(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
	return this
}

bw=new checkBrowser()

function show(div,nest){
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0; 
	obj.visibility='visible'
}

function hide(div,nest){
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0; 
	obj.visibility='hidden'	
}
function hideAll(div,cant){
	var d = div.substring(div.length-1,div.length);
	for(var i=0;i<cant;i++){
		if ( parseInt(d)!= i)
			hide('foto'+i);
	}
}

function simplePreload(){ 
	var args = simplePreload.arguments;
  	document.imageArray = new Array(args.length);
  	for(var i=0; i<args.length; i++){
    	document.imageArray[i] = new Image;
   		document.imageArray[i].src = args[i];
	}
}

function switchImage(imgName, imgSrc){
	if (document.images){
		if (imgSrc != "none")
    		document.images[imgName].src = imgSrc;
    }
}
