function fusion() {

			var fusionurl = 'http://www.hostwrap.com/popupad.php?id=' + id;
			window2=window.open(fusionurl,'HostWrap','width=450,height=250,left=100,right=100,top=100,toolbar=no,menubar=no,scrollbars=no,status=no,resizable=no,status=no,location=no');
			window2.blur();
			window2.focus();
			return true;

}


function doAgilePopup(){
var theURL = "http://www.hostwrap.com/pricing.php?id=" + id;
var title = "HostWrap"
var windowWidth  = 300; // cannot be less than 100
var windowHeight = 300; // cannot be less than 100
var windowX = 200;
var windowY = 200;
var autocenter = true;
var autoclose = false;

var s="width="+windowWidth+",height="+windowHeight;
var beIE=document.all?true:false;
var done=new Object("no");

if(autocenter){
windowX = (window.screen.width-windowWidth)/2;
windowY = (window.screen.height-windowHeight)/2;
}


  if (beIE){
  agilePopper = window.open("","popAgile","fullscreen,"+s);  
  agilePopper.blur();
  window.focus();
  agilePopper.resizeTo(windowWidth,windowHeight);
  agilePopper.moveTo(windowX,windowY);
  var frameString=""+
"<html>"+
"<head>"+
"<title>"+title+"</title>"+
"</head>"+
"<frameset rows='*,0' framespacing=0 border=0 frameborder=0>"+
"<frame name='top' src='"+theURL+"' scrolling=no>"+
"<frame name='bottom' src='about:blank' scrolling='no'>"+
"</frameset>"+
"</html>"
  agilePopper.document.open();
  agilePopper.document.write(frameString);
  agilePopper.document.close();
  }else{
  agilePopper=window.open(theURL,"popAgile","scrollbars=no,"+s);
  agilePopper.blur();
  window.focus(); 
  agilePopper.resizeTo(windowWidth,windowHeight);
  agilePopper.moveTo(windowX,windowY);
  }   
  agilePopper.blur(); 
  if (autoclose){
  window.onunload = function(){agilePopper.close();}
  }  
  done="okay";
}


//document.onunload=fusion;
//window.onunload=fusion;
//window.onclose=fusion;
function onClose(){
//
	if(window.screenTop>9000){
//		alert(window.screenTop);
		fusion();
	}
}
window.onunload=onClose;


//document.onunload=doAgilePopup;
//window.onunload=doAgilePopup;
