function getURLParameters() 
{
	var sURL = window.document.URL.toString();
	if (sURL.indexOf("?") > 0)
	{
		var arrParams = sURL.split("?");
			
		var arrURLParams = arrParams[1].split("&");
		
		var arrParamNames = new Array(arrURLParams.length);
		var arrParamValues = new Array(arrURLParams.length);
		
		var i = 0;
		for (i=0;i<arrURLParams.length;i++)
		{
			var sParam =  arrURLParams[i].split("=");
			arrParamNames[i] = sParam[0];
			if (sParam[1] != "")
				arrParamValues[i] = unescape(sParam[1]);
			else
				arrParamValues[i] = "No Value";
		}
		
		for (i=0;i<arrURLParams.length;i++)
		{
			if (arrParamNames[i]="pag")
			  return arrParamValues[i]; 
			//alert(arrParamNames[i]+" = "+ arrParamValues[i]);
		}
	}
	else
	{
		return "";//alert("No parameters.");
	}
}

function FINDLayer(item) {
	if( window.mmIsOpera ) return(document.getElementById(item));
	if (document.all) return(document.all[item]);
	if (document.getElementById) return(document.getElementById(item));
	return(false);
}

function autofitIframe(id)
{
 if (!window.opera && !document.mimeType && document.all && document.getElementById)
   {
   parent.document.getElementById(id).style.height=(this.document.body.offsetHeight+20)+"px";
   }
 else if(document.getElementById) {
   parent.document.getElementById(id).style.height=(this.document.body.scrollHeight+20)+"px"
   }
}

function AbreVentana(url)
{
MiVentana=window.open(url,'Ventana','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes') ;
MiVentana.focus();
}