function md5auth1(Seed)
{
	var Password = document.LoginNow.Password.value;
	var Hash = MD5(Seed+Password);
	document.LoginNow.Password.value='';
	document.LoginNow.Hash.value=Hash;
	document.LoginNow.submit()
}

function md5auth2(Seed)
{
	var Password = document.LoginForm.Password.value;
	var Hash = MD5(Seed+Password);
	document.LoginForm.Password.value='';
	document.LoginForm.Hash.value=Hash;
	document.LoginForm.submit()
}

function OpenStockWin(symbol)
{
	window.open("stockchart.asp?s=" + symbol ,"Chart","height=350,width=550,left=80,top=80,scrollbars=no,menu=no,navbar=no,sizeable=yes");
}

function OpenWindow(getUrl,getTarget,getScrollbar,getMenubar,getHeight,getWidth,getResize,getToolbar,getLocation,getStatus)
{
window.open(getUrl,getTarget,'top=0,left=0,scrollbars='+getScrollbar+',menubar='+getMenubar+',height='+getHeight+',width='+getWidth+',resizable='+getResize+',toolbar='+getToolbar+',location='+getLocation+',status='+getStatus+'')
}

function OpenFile(PageURL,WindowWidth,WindowHeight)
{
	window.open(PageURL,'FileViewer','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=no,width=' + WindowWidth + ',height=' + WindowHeight + ',top=50,left=50');
}

function CaricaFoto(img){
  foto1= new Image();
  foto1.src=(img);
  Controlla(img);
}

function Controlla(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
  }
  else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}

function viewFoto(img){
  largh=foto1.width+20;
  altez=foto1.height+20;
  stringa="width="+largh+",height="+altez;
  finestra=window.open(img,"",stringa);
}

function OpenPrintView(PageURL)
{
	window.open(PageURL,'PrintViewer','toolbar=yes,location=no,directories=no,status=yes,menubar=yes,resizable=yes,copyhistory=no,scrollbars=yes');
}

