//<!--
//menu select
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(url, larghezza,altezza)
	{
		string="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width="+larghezza+",height="+altezza+",top=0,left=0";
		fin=window.open(url,"prodotto",string);
		fin.focus();
	}
	
var bV=parseInt(navigator.appVersion);
NS4=(document.layers)?true:false;
IE4=(document.all)?true:false;
ver4=(NS4 || IE4)?true:false;
if (document.images) {
arImLoad=new Array ("../img/img/bullet.gif");
arImList=new Array ();
for (counter in arImLoad) {
arImList[counter]=new Image();
arImList[counter].src=arImLoad[counter] + ".gif";
}}
function expandIt(){return}
function expandAll(){return}

isExpanded=false;
function reDo(){window.location.reload()}
function getIndex(el) {
ind=null;
for (i=0; i<document.layers.length; i++) {
whichEl=document.layers[i];
if (whichEl.id==el) {
ind=i;
break;
}
}
return ind;
}
function arrange() {
nextY=document.layers[firstInd].pageY + document.layers[firstInd].document.height-10;
for (i=firstInd+1; i<document.layers.length; i++) {
whichEl=document.layers[i];
if (whichEl.visibility != "hide") {
whichEl.pageY=nextY;
nextY += whichEl.document.height-10;
}
}
}
function initIt(){
if (NS4) {scrollTo(0,pageYOffset-30)
for (i=0; i<document.layers.length; i++) {
whichEl=document.layers[i];
if (whichEl.id.indexOf("Child") != -1) {
whichEl.visibility="hide";
whichEl.isExpanded=false;
}
}
arrange();
setTimeout("window.onresize=reDo",1000)
}
else {
tempColl=document.all.tags("DIV");
for (i=0; i<tempColl.length; i++) {
if (tempColl(i).className == "tdBox02" || tempColl(i).className == "tdBox03") {
tempColl(i).style.display="none";
tempColl(i).isExpanded=false;
}
}
}
}
function expandIt(el) {
if (!ver4) return;
if (IE4) {expandIE(el)} else {expandNS(el)}
}
function expandIE(el) {
whichEl=eval(el + "Child");
whichIm=event.srcElement;
if (whichEl.style.display == "none") {
whichEl.style.display="block";
whichEl.isExpanded=true;
whichIm.src="../img/img/bullet.gif";
}
else {
whichEl.style.display="none";
whichEl.isExpanded=false;
whichIm.src="../img/img/bullet.gif";
}
}
function expandNS(el) {
whichEl=eval("document." + el + "Child");
whichIm=eval("document." + el + "Parent.document.images['imEx']");
if (whichEl.visibility == "hide") {
whichEl.visibility="show";
whichEl.isExpanded=true;
whichIm.src="../img/img/bullet.gif";
}
else {
whichEl.visibility="hide";
whichEl.isExpanded=false;
whichIm.src="../img/img/bullet.gif";
}
arrange();
}
function showAll() {
for (i=firstInd; i<document.layers.length; i++) {
whichEl=document.layers[i];
whichEl.visibility="show";
}
}
function expandAll(isBot) {
newSrc=(isExpanded)?"../img/img/bullet.gif":"img/bullet.gif";
if (NS4) {
document.images["imEx"].src=newSrc;
for (i=firstInd; i<document.layers.length; i++) {
whichEl=document.layers[i];
if (whichEl.id.indexOf("Parent") != -1) {
whichEl.document.images["imEx"].src=newSrc;
}
if (whichEl.id.indexOf("Child") != -1) {
whichEl.visibility=(isExpanded)?"hide":"show";
whichEl.isExpanded=(isExpanded)?false:true;
}
}
arrange();
if (isBot && isExpanded) scrollTo(0,document.layers[firstInd].pageY);
}
else {
divColl=document.all.tags("DIV");
for (i=0; i<divColl.length; i++) {
if (divColl(i).className == "tdBox02" || divColl(i).className == "tdBox03") {
divColl(i).style.display=(isExpanded)?"none":"block";
divColl(i).isExpanded=(isExpanded)?false:true;
}
}
imColl=document.images.item("imEx");
for (i=0; i<imColl.length; i++) {
imColl(i).src=newSrc;
}
}
isExpanded=!isExpanded;
}

function linkIt(whichEl, whichHref) {
lay=(NS4)?eval("document."+whichEl+"Child"):eval(whichEl+"Child");
if (!lay.isExpanded) expandIt(whichEl);
nlay=(NS4)?lay.document.images[whichHref]:document.images[whichHref];
if (NS4){
sY=nlay.y+lay.pageY-20
window.scrollTo(0,sY);
}else{nlay.scrollIntoView();scroll(0,document.body.scrollTop-20);
//alert(nlay.parentElement.tagName);
nlay.parentElement.style.backgroundColor="#FF99FF";setTimeout("nlay.parentElement.style.backgroundColor='white'",1000);}
}
window.onload=initIt;


//TASTO DESTRO
//function right(e) {
//if (navigator.appName == 'Netscape' && 
//(e.which == 3 || e.which == 2))
//return false;
//else if (navigator.appName == 'Microsoft Internet Explorer' && 
//(event.button == 2 || event.button == 3)) {
//alert("Copyright by www.italylimo.com");
//return false;
//}
//return true;
//}
//document.onmousedown=right;
//if (document.layers) window.captureEvents(Event.MOUSEDOWN);
//window.onmousedown=right;
//FINE TASTO DESTRO


//conferma eliminazione
function GP_popupConfirmMsg(msg) { //v1.0
  document.MM_returnValue = confirm(msg);
}
//fine conferma elliminazione
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function chiudi_finestra(){
    //opener.document.location.reload();
    //window.close();
	location.href = "http://www.italylimo.com/basket-01.php";
}
//EVITA LA COPIA DEL CAMPO INPUT
var digit = 1; 
function Chk_Digit(valore) { 
if (valore > (digit+2)) { 
		//document.aggiungi.t_email.value = ""; 
		//document.aggiungi.t_remail.value = ""; 				
		//alert("ATTENZIONE\n\nTo avoid possible errors the copy and paste function is disabled."); 
		digit = 1; 
} 
else digit = valore; 
} 

function Chk_Digit2(valore) { 
if (valore > (digit+2)) { 
		//document.aggiungi1.t_email.value = ""; 
		//document.aggiungi1.t_remail.value = ""; 				
		//alert("ATTENZIONE\n\nTo avoid possible errors the copy and past function is disabled."); 
		digit = 1; 
} 
else digit = valore; 
} 
//FINE EVITA LA COPIA DEL CAMPO INPUT

//Out
	function Out()
	{
		self.location.replace('http://www.italylimo.com/index.php') 		
	}
//-->


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 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 printOrderDetail() {
	theNewUrl = location.href + "?print=y";
	window.open(theNewUrl, 'print', 'width=760,height=600,resizable=yes,scrollbars=yes');
}
