// JavaScript Document
// Read a page's GET URL variables and return them as an associative array.
function getUrlVars()
{
	try
	{
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
	var url = window.location.href;
	
	
    for(var i = 0; i < hashes.length; i++)
    {
        hash = hashes[i].split('=');
		
		
        if( hash[0]=="quote" )
		{
			var varget= url.split('?');
	
			openBannerIframe("http://alianza.iatai.com/travel_protection/restore_email.php?"+varget[1]);
			
		}
       
    }

    return vars;
	}catch(error)
	{
		alert(error);
	}
}

//José Joaquín Gamboa S(jose_9515@hotmail.com)
//this a function for  reSize an iframe
function reSize()
{
	try{
	var oBody	=	ifrm.document.body;
	var oFrame	=	document.all("ifrm");

	oFrame.style.height = oBody.scrollHeight + (oBody.offsetHeight - oBody.clientHeight);
	alert(oBody.offsetHeight - oBody.clientHeight);
	oFrame.style.width = oBody.scrollWidth + (oBody.offsetWidth - oBody.clientWidth);
	}
	//An error is raised if the IFrame domain != its container's domain
	catch(e)
	{
	window.status =	'Error: ' + e.number + '; ' + e.description;
	}
}

//José Joaquín Gamboa S. (jose_9515@hotmail.com)
//this is a function for open de url into iframe
function openBannerIframe( url){
	
	try{
		
		var fr = document.getElementById('ifrm');
            fr.src=url;
		
	}catch(error)
	{
		alert(error);
	}
	
}

