<!--
// Rutina per obrir popups ...     
var win= null;

function newWindow(mypage,myname,w,h,scroll,pos) {
	if(pos=="random") {
		LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
		TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
	} else if(pos=="center") {
		LeftPosition=(screen.width)?(screen.width-w)/2:100;
		TopPosition=(screen.height)?(screen.height-h)/2:100;
	} else {
		LeftPosition=0;TopPosition=20
	}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
	win=window.open(mypage,myname,settings);

}

function newImagePopup(myimage,myname,w,h,scroll){
	settings='width='+w+',height='+h+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
	win=window.open('','mapa',settings);
	win.document.write("<html><head><title>"+myname+"</title></head><body><img src='"+myimage+"' title='"+myname+"'/></body></html>");
	win.document.close();
}

function changeReqCode(reqCode){
	document.getElementById('reqCode').value = reqCode;
}

function loadCSS(css){
		var head = document.getElementsByTagName('head')[0];
		var link = document.createElement("LINK");
		link.setAttribute("href",css);
		link.setAttribute("rel", "stylesheet");
		link.setAttribute("type", "text/css");
		head.appendChild(link);
}

function loadJS(js){
		var head = document.getElementsByTagName('head')[0];
		var script = document.createElement("SCRIPT");
		script.setAttribute("type",'text/javascript');
		script.setAttribute("src", js);
		head.appendChild(script);
}

// -->

