/*if (self != top) {
evitare apertura frame da altri siti
	if (document.images)
		top.location.replace(window.location.href);
	else
		top.location.href = window.location.href;
}*/
function pully(pull) {
indirizzo = (pull.elenco.options[pull.elenco.selectedIndex].value);
window.open(indirizzo);
}
var preferiti="http://www.notrace.it/";
var titolo="NoTrace Security";

function InserisciPreferiti()
{
if(document.all)
window.external.AddFavorite(preferiti,titolo);
}

function testt(n, d) { //v3.0
  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=testo2(n,d.layers[i].document);
return x;
}

function tes(objName,x,newText) { 

  var obj = testt(objName); 
  if (obj) obj.value = newText;
}

function traduci(tipo) 
{
if (tipo!=1)
 {
  window.open("http://translate.google.com/translate_c?hl=" + cbotraduci.options[cbotraduci.selectedIndex].value + "&sl=it&u=" + document.location, "google");
 }
 else
 {
  window.open("http://translate.google.com/translate_c?hl=en&sl=it&u=" + document.location, "google");
 }
}

function open_window(url) //segnala
{
window.open(url,'window','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=700,height=400');
}
function Controlla()
{
if (document.CDOEMAIL.Address.value=="")
{
alert("E' necessario inserire Una E-Mail");
return false;
}
else 
if  (document.CDOEMAIL.Address.value.indexOf("@") == -1 )
{
alert("E-Mail non valida ");
return false;
}
return true;
}
function expandingWindow(website) {
	var windowprops='width=1,height=1,scrollbars=yes,status=no,resizable=yes,location=no'
	var heightspeed = 4; 
	var widthspeed = 4; 
	var leftdist = 10;   
	var topdist = 10; 
	var lunghezza = 800;
	var altezza = 600;
	website="/Download/ScreenShot.asp?cod=" + website
	if(lunghezza == 0){
		lunghezza = window.screen.availWidth;
	}
	if(altezza == 0){
		altezza = window.screen.availHeight;
	}
	if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1) {
		var winwidth = lunghezza;
		var winheight = altezza;
		var sizer = window.open("","","left=" + leftdist + ",top=" + topdist +","+ windowprops);
		for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed)
		sizer.resizeTo("1", sizeheight);
		for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed)
		sizer.resizeTo(sizewidth, sizeheight);
		sizer.location = website;
	}
	else
		window.open(website,'website');
}
function reloadCAPTCHA() {
	document.getElementById('captcha').src='/captcha/captcha.asp?'+Date();
}
function MostraNascondi(id1,id2) {
  if(document.getElementById) {
    el1 = document.getElementById(id1);
    el2 = document.getElementById(id2);
    if(el1.style.display=="none") {
      el1.style.display = "block";
      el2.style.display = "none";
    }
	else {
      el1.style.display="none";
      el2.style.display="block";
    }
  }
}