//Script International

function writeFlash(){
	var flash=""
	+"<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" width=\"764\" height=\"90\" id=\"topmenu\">"
	+"	 <param name=movie value=\"/ma/flash/menutop_sm.swf\"> "
	+"	 <param name=loop value=false><param name=menu value=false> <param name=quality value=high><param name=scale value=exactfit>"
	+"	 <embed src=\"/ma/flash/menutop_sm.swf\" loop=false menu=false quality=high scale=exactfit width=\"764\" height=\"90\" name=\"topmenu\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed>"
	+"</object><br><img src=\"/img/im_spacer.gif\" width=\"75\" height=\"5\" border=\"0\">"
	document.write(flash);
}

function putTextStatus(txt){
	window.status=txt;
}


/** If a page is intended to be opened only within a frameset,
 * this function refers the browser immediately to the frameset page.
**/
function loadFrameSet(url) {

 if (!parent.frames['printWinTop']) {

  //> Detects if page already displayed in main.jsp
  var mainWin = parent.location.href;
  var mainIdx = mainWin.indexOf("main.jsp");

  if ( (mainIdx != -1) || (parent.location.href == self.location.href) ) {

   var path  = url.pathname;

   //> Get Main Frame URL Query Portion
   var urlSrch = (url.search) ? url.search : "";

   var file  = path.substring(path.lastIndexOf("/") + 1, path.length);
   var lang  = path.substring(1,3);
   var group = path.substring(4,7);

   var phost = location.protocol + '//' + location.host;

   var fileName = path + urlSrch;
   var newUrl = phost +
"/index.jsp?id="+group+"&lang="+lang+"&file="+escape(fileName);

   if (mainIdx != -1) {
    var idIdx = mainWin.indexOf("?id");
    var mainGroup = mainWin.substring(idIdx+4,idIdx+7);

    if (mainGroup != group)
     top.location = newUrl;
   }
   else
    top.location = newUrl;
  }
 }
}

function openpop(page) {

			if (page == 'nohref')
				{ return; }

	        else
			{
				var iMyWidth;
				var iMyHeight;
				iMyWidth = (window.screen.width/2) - (220 + 10);
				iMyHeight = (window.screen.height/2) - (250 + 10);
				var win2 = window.open(page,"Bombardier","width=678,height=630,resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=no");
				win2.focus();
			}
}

function openback(page) {

			if (page == 'nohref')
				{ return; }

	        else
			{
				var iMyWidth;
				var iMyHeight;
				iMyWidth = (window.screen.width/2) - (220 + 10);
				iMyHeight = (window.screen.height/2) - (250 + 10);
				var win2 = window.open(page,"Bombardier","width=790,height=390,resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes");
				win2.focus();
			}
}

function openpoplibrary(page) {

			if (page == 'nohref')
				{ return; }

	        else
			{
				var iMyWidth;
				var iMyHeight;
				iMyWidth = (window.screen.width/2) - (330 + 10);
				iMyHeight = (window.screen.height/2) - (200 + 10);
				var win2 = window.open(page,"Bombardier","width=660,height=400,resizable=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes");
				win2.focus();
			}
}


function openpopPDF(page) {

			if (page == 'nohref')
				{ return; }

	        else
			{
				var iMyWidth;
				var iMyHeight;
				iMyWidth = (window.screen.width/2) - (260 + 10);
				iMyHeight = (window.screen.height/2) - (215 + 10);
				var win2 = window.open(page,"Bombardier","width=400,height=200,resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=no");
				win2.focus();
			}
}

/* Resize Pop Up */

function resizepop(img){
  foto1= new Image();
  foto1.src=(img);
  infoImg(img);
}

function infoImg(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
  } else {
    funzione="infoImg('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}

function viewFoto(img){
  lar=foto1.width+20;
  hei=foto1.height+20;
  stringa="width="+lar+",height="+hei+",resizable=yes";
  finestra=window.open(img,"",stringa);
}
