function getwindowheight() {
	if (navigator.userAgent.indexOf("MSIE") > 0) {var sSize = document.body.clientHeight; return sSize;}
	else {var sSize = window.innerHeight; return sSize;}
	return;
}
function getwindowwidth() {
	if (navigator.userAgent.indexOf("MSIE") > 0) {var sSize = document.body.clientWidth; return sSize;}
	else {var sSize = window.innerWidth; return sSize;}
	return;      
}
function resizeIt() {
	if (navigator.appName == "Microsoft Internet Explorer") location.reload();
	else {if (saveInnerWidth < window.innerwidth || saveinnerwidth > window.innerWidth || saveInnerHeight > window.innerHeight || saveInnerHeight < window.innerheight ) window.history.go(0);}
}


function CaricaFoto(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+20;
  altez=foto1.height+20;
  stringa="width="+largh+",height="+altez;
  finestra=window.open(img,"",stringa);
  //window.open(img,"",stringa);
}
var message="Function Disabled!";
function clickIE4(){
	if (event.button==2){
		alert(message);
		return false;
	}
}
function clickNS4(e){
	if (document.layers||document.getElementById&&!document.all){
		if (e.which==2||e.which==3){
			alert(message);
			return false;
		}
	}
}
var url = location.href
var lead = url.indexOf("//");
var start = lead + 2;
var without_resource = url.substring(start, url.length); //url without "http://"
var next_slash = without_resource.indexOf('/'); //find end of domain
var last_slash = without_resource.lastIndexOf('/'); //find last slash (beginning of page)
var domain = without_resource.substring(0, next_slash);
var page = without_resource.substring(last_slash+1,url.length+1);

var this_slash = new Array
var this_dir = new Array
var y=0,z=0
for (i=0; i<without_resource.length; i++) { //finds all of the slashes
	if (without_resource.charAt(i) == "/") {
		this_slash[y] = i
		y=y+1
	}
}
for (i=0; i<this_slash.length-1; i++) { //puts each directory in an array
	j=i+1
	this_dir[z] = without_resource.substring(this_slash[i]+1,this_slash[j]);
	z=z+1
}