//<!-- 
function wod( url,wid,hei ) {
editwnd=window.open(url,"editwnd",'width='+ wid +',height='+ hei +',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1 ,resizable=1');
if (editwnd.opener == null) editwnd.opener = self;
editwnd.window.focus();
}

function woi( i_Src,i_W,i_H ) {
var str;
var sb;
if(i_W>(screen.width-200)) { sb='1'; ww=screen.width-200; } else { sb='0'; ww=i_W+5; }
if(i_H>(screen.height-200)) { sb='1'; wh=screen.height-200; } else { sb='0'; wh=i_H+5; }

preview=window.open('',"preview",'width='+ ww +',height='+ wh +',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars='+ sb +',resizable=0');
if (preview.opener == null) preview.opener = self;
preview.document.clear();
if (sb==0) { preview.window.resizeTo((i_W+32), (i_H+64)) };

str= "<html><head><title></title><style type='text/css'>body,html{margin:0;padding:0;}</style></head><body bgcolor='#E7E7E7' onclick='self.close()' oncontextmenu='self.close()'>";
str = str + "<img border='1' height='"+i_H+"' width='"+i_W+"' src='"+ i_Src +"'>";
str = str + "</body></html>";

preview.document.writeln(str);
preview.window.focus();
preview.document.close();
timer = setTimeout("preview.close()",99000);
}
//-->
//<!-- 
function vFoto(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,500);
  }
}
function viewFoto(img){
  iw=foto1.width;
  ih=foto1.height;
  woi(img,iw,ih);
}




var ie4=document.all?1:0;
var ns6=document.getElementById&&!document.all?1:0
var head="display:''"
var folder=''

function v(node) {
if (ie4) {hid=document.all[node]}
if (ns6) {hid=document.getElementById([node])}
 if (hid.style.display == "none") {
  hid.style.display = "";
 } 
  else 
 {
  hid.style.display = "none";
 }
}

	function confirmDelete(id, ask, url) //confirm order delete
	{
		temp = window.confirm(ask);
		if (temp) //delete
		{
			window.location=url+id;
		}
	}

function confirmDelete2(question, where)
{
	temp = window.confirm(question);
	if (temp) //delete
	{
		wod(where,400,300);
		window.location=window.location;
	}
}


function open_window(link,w,h) //opens new window
{
	var win = "width="+w+",height="+h+",menubar=no,location=no,resizable=yes,scrollbars=yes";
	wishWin = window.open(link,'wishWin',win);
}

function position_this_window()
{
	var x = (screen.availWidth - 795) / 2;
	window.resizeTo(795, screen.availHeight - 50);
	window.moveTo(Math.floor(x),25);
}





//-->