function showObject(data,width,height)
{
	document.write('<object type="application/x-shockwave-flash" data="'+data+'" width="'+width+'" height="'+height+'">');
	document.write('<param name="movie" value="'+data+'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="transparent">');
	document.write('</object>');
}

function modalDialogShow(url,width,height)
{
	var left = screen.availWidth/2 - width/2;
	var top = screen.availHeight/2 - height/2;
	activeModalWin = window.open(url, "", "location=no, menubar=no, resizable=no, scrollbars=no, status=no, titlebar=no, toolbar=no, width="+width+",height="+height+",left="+left+",top="+top);
	window.onfocus = function(){if (activeModalWin.closed == false){activeModalWin.focus();};};
}

function show_Object(data,width,height)
{
	document.write('<object type="application/x-shockwave-flash" data="'+data+'" width="'+width+'" height="'+height+'">');
	document.write('<param name="movie" value="'+data+'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="transparent">');
	document.write('</object>');
}

function showMsg(w,h)
{
	var box=document.getElementById("divMsg");
	//box.style.top=parseInt((screen.availHeight - h)/2) + "px";
	//box.style.left=parseInt((screen.availWidth - w)/2) + "px";
	box.style.display="block";
}
	
function Permut (flag,img)
{
   if (document.images)
   {
     if (document.images[img].permloaded)
     {
       if (flag==1) document.images[img].src = document.images[img].perm.src
           else document.images[img].src = document.images[img].perm.oldsrc
     }
   }
}

function preloadPermut (img,adresse)
{
   if (document.images)
   {
     img.onload = null;
     img.perm = new Image ();
     img.perm.oldsrc = img.src;
     img.perm.src = adresse;
     img.permloaded = true;
   }
}

function disableSelection(element)
{
if (typeof(element.onselectstart)!="undefined") // IE
	element.onselectstart=function(){ return false; }
else if (typeof(element.style.MozUserSelect)!="undefined") // Firefox
	element.style.MozUserSelect="none";
else // Altri (es: Opera)
	element.onmousedown=function(){ return false; }
	element.style.cursor = "default";
}

//window.onload = function() { disableSelection(document.body); }
//window.onload = function() { disableSelection(document.getElementById('mn')); }
