/************************************************
*	Funzione per la gestione dei Layers
************************************************/
function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
	this.obj = getObjNN4(document,name);
	this.style = this.obj;
  }
}

function getObjNN4(obj,name)
{
	var x = obj.layers;
	var foundLayer;
	for (var i=0;i<x.length;i++)
	{
		if (x[i].id == name)
		 	foundLayer = x[i];
		else if (x[i].layers.length)
			var tmp = getObjNN4(x[i],name);
		if (tmp) foundLayer = tmp;
	}
	return foundLayer;
}

function OpenWindow(id)
{
	var pageName = "products_popup.aspx?PageId=" + id;
	window.open(pageName,"mywindow","height=510,width=500,status=no,toolbar=no,menubar=no,location=no");
}

function OpenWindow2(id)
{
	var pageName = "products_popup2.aspx?PageId=" + id;
	window.open(pageName,"mywindow","height=600,width=530,status=no,toolbar=no,menubar=no,location=no");
}


function OpenComWindow(id)
{
	var pageName = "showmedia.aspx?FileName=" + id;
	window.open(pageName,"mywindow","height=400,width=400,status=no,toolbar=no,menubar=no,location=no");
}

function OpenPresseWindow(id)
{
	var pageName = "/fr/presse_popup.aspx?PageId=" + id;
	window.open(pageName,"mywindow","height=590,width=430,status=no,toolbar=no,menubar=no,location=no");
}

function OpenPresseWindow2(id)
{
	var pageName = "/fr/presse_popup2.aspx";
	window.open(pageName,"mywindow","height=420,width=636,status=no,toolbar=no,menubar=no,location=no");
}
