﻿    
    function setParentFrameHeight()
    {
      var parameters = location.hash.replace('#','').split(":");
      var iframeheight = parameters[0];
      var scrolltop = parameters[1];
      
      var doConversionTracking = false;
      var orderid, orderamount, tax, customercity, customercounty, customercountry,customerref;
      if (parameters[2] == "Y")
      {
	    doConversionTracking = true;
	    transactionInfo = parameters[3].split(',');
	    orderid = transactionInfo[0];
	    orderamount = transactionInfo[1];
	    tax = transactionInfo[2];
	    customercity = transactionInfo[3];
	    customercounty = transactionInfo[4];
	    customercountry = transactionInfo[5];
	    customerref = transactionInfo[6];
	  }
	 
	//if(iframeheight>500)
	//iframeheight=985;

       parent.parent.setIframeHeight(iframeheight);

	//alert(iframeheight);
	


       
       if(scrolltop=="Y")
       parent.parent.window.scroll(0,0);
       
       if (doConversionTracking && typeof(parent.parent.ConversionSuccessful) == 'function')
           parent.parent.ConversionSuccessful(orderid, orderamount, tax, customercity, customercounty, customercountry, customerref);
	
    }
    

		function setIframeHeight(x)
		{
		    // set the iframe height
		    document.getElementById('pqeFrame').height = x;
	    }    