// JavaScript Document
function BigImage(nomeFile) {
	finestra=window.open('','finestra','width=100,height=100,status=no,menubar=no,resizable=no,scrollbars=yes');
 
	with(finestra.document) {
		open();
		write("<HTML><HEAD>");
		write("<TITLE>Mondo Moto</TITLE>");
		write("<link href=templates/moto/css/template_css.css rel=stylesheet type=text/css>");
		write("</HEAD><BODY onLoad='self.focus();'>");
		write("<br><a href='javascript:window.close();'><IMG SRC='" + nomeFile + "' onload='window.resizeTo(this.width + 50, this.height + 65);' border=0 style='border:1px; solid; #FFFF99;'></a><br>");
		write("<a href='javascript:window.close();'>Chiudi finestra</a>");
		write("</BODY></HTML>");
		close();
	}
}

function resize_iframe() {
	//resize the iframe according to the size of the

	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
    	//Non-IE
	    myWidth = window.innerWidth;
    	myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    	//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    	//IE 4 compatible
	    myWidth = document.body.clientWidth;
    	myHeight = document.body.clientHeight;
	}
	//window.alert( 'Width = ' + myWidth );
	//window.alert( 'Height = ' + myHeight );
	
	//window (all these should be on the same line)
	//document.getElementById('CURR_IFRAME').style.height=parseInt(document.body.clientHeight-document.getElementById('CURR_IFRAME').offsetTop-8)+"px";
	document.getElementById('CURR_IFRAME').style.height=parseInt(myHeight)+"px";	
	
	//document.getElementById('CURR_IFRAME').style.width=parseInt(myWidth-document.getElementById('CURR_IFRAME').offsetLeft-250)+"px";	
	document.getElementById('CURR_IFRAME').style.width="530px";
}

