function linksubmit(where,tipo,album,fotonum,maxnum)
{
	if (where=='sw')
	{
		document.gotoform.tipo.value=tipo;
		document.gotoform.album.value=album;
		document.gotoform.fotonum.value=fotonum;
		document.gotoform.maxnum.value=maxnum;
		document.gotoform.action='showfoto.php';
	}
	if (where=='th')
	{
		document.gotoform.tipo.value=tipo;
		document.gotoform.album.value=album;
		document.gotoform.action='showthumb.php';
	}
	if (where=='ft')
	{
		document.gotoform.tipo.value=tipo;
		document.gotoform.action='foto.php';
	}
	if (where=='si')
	{
		document.gotoform.tipo.value=tipo;
		document.gotoform.action='amiche.php';
	}
	if (where=='am')
	{
		document.gotoform.tipo.value=tipo;
		document.gotoform.action='amici.php';
	}
	document.gotoform.submit();
}
function popunico(str,h,v) { 
//! Il comando scrollbars indica se vi desiderano o meno le barre di scorrimento
//! Il comando resizable determina se la finestra puņ essere ridimensionata trascinandola oppure no
//! width e height determina rispettivamente la larghezza e l'altezza della finestra popup in pixels
//! top e left determinano il posizionamento del popup in pixels rispettivamente dall'alto e dal lato sinistro dello monitor
//! Il comando status determina se si desidera o meno che sia presente la barra di stato
//! Il comando location determina se deve apparire o meno la barra degli indirizzi
//! Il comando toolbar determina se deve apparire o meno la barra dei comandi
nomevar = window.open(str,'paginafissa','scrollbars=no,resizable=yes,width='+h+',height='+v+',top=10,left=10,status=no,location=no,toolbar=no'); 
nomevar.focus(); 

} 



function SetMainDivSize (full)
{
	var winW = 630, winH = 460, x,y,l;

	var winW = 630, winH = 460, x,y,l;

	if (parseInt(navigator.appVersion)>3) 
	{
 		if (navigator.appName=="Netscape") 
 		{
  			winW = window.innerWidth;
  			winH = window.innerHeight;
 		}
 		if (navigator.appName.indexOf("Microsoft")!=-1) 
 		{
  			winW = document.body.offsetWidth;
  			winH = document.body.offsetHeight;
 		}
	}
//	document.write( "Window width = "+winW+"<br>"+"Window height = "+winH);

	y=650;
//	if (y<600)
//		y=600;	
	l=winW-440;
	if (l<750)
		l=750;
	if (full==1)
		y='100%'
	else
		y+='px';
//	document.write('-H='+winH+'-W='+winW+'<BR>');
	document.write(	'<style type="text/css">');
	document.write( '#top {width: '+(l+200)+'px;  }');
	document.write( '#corpo { width: '+l+'px; }');

	document.write( '#dx {  left:'+(l+210)+'px; }');
	document.write( '#corpolarge { width: '+(winW-25)+'px; }');
	document.write( '#corpolargedx { width: '+(winW-210)+'px; }');
	document.write( '</style>');
}

function GetParamsAndSave()
{
	window.NoTestMouse=true;
	GetParams();
}

function GetParams()
{
//	alert(window.NoTestMouse);
	if (window.NoTestMouse==null)
		window.NoTestMouse=false;
//	alert(window.NoTestMouse);
		
	
	_nodnmsg="Non fare il furbetto, queste immagini non si possono scaricare!!!";
	if (!window.NoTestMouse)
	{
		if (document.layers) 
		{
			document.captureEvents(Event.MOUSEDOWN);
			document.onmousedown=disableNS;
		} 
		else 
		{
			document.onmouseup=disableNS;
			document.oncontextmenu=disableIE;
		}
		document.oncontextmenu=new Function("alert(_nodnmsg);return false")
	}
	useparent=0;
	if (useparent==1)
		_l=parent.document.location.toString().split("?");
	else
		_l=document.location.toString().split("?");
 	
	_param ="";
	if(_l[1])
	{
 		_param = _l[1].split("&"); /* now _param is an array of all parameters */
	}
}

function disableIE() 
{
	if (document.all) 
	{
		alert(_nodnmsg);
		return false;
	}
	return true;
}

function disableNS(e) 
{
	if (document.layers||(document.getElementById&&!document.all)) 
	{
    		if (e.which==2||e.which==3) 
		{
			alert(_nodnmsg);
			return false;
		}
  	}
	return true;
}

function Email()
{
        document.write('<div align=\"center\"><a href=\"mailto:'+_email+'\"><img src=\"img/email.gif\" width=\"90\" height=\"66\" border=\"0\"></a></div>');
}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function ValidateFormDVD(){
	var emailID=document.mailform.txtEmail
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Inserisci al tua email")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}

	return true
 }

