//create a host object for links going from https to http
var host = new Object();
host = document.location.hostname;
var httphost = "http://"+host; 

function maoDemo(theUrl, winName)
{
	window.open(theUrl, winName, "width=785,height=640,scrollbars,top=0,status,scrollbars,left=0,toolbar");
}

function PrivTermsPop(theUrl, winName)
{
	window.open(theUrl, winName, "width=566,scrollbars,resizable,top=0,status,scrollbars,left=0");
}

function termsApply()
{
	window.open('http://' + host + '/at_home/Global_includes/DiscountPopUp.html','discountterms_form','width=567,height=200,status,scrollbars,top=0,left=0');
}

// gets website prefixed by http or https use for secure pages
function GetHTTPPrefix()
{
	var nHost = host;
	if (host == "www.ntgreenenergy.org.uk") {
		nHost = "www.npower.com";
	}
	var prefix = "";
	if ((nHost != "localhost")&& (nHost != "ohndb05")&& (nHost != "www.npower.com"))
		prefix = "https://"+nHost;
	else
		prefix = "http://"+nHost;
		
	return prefix;	  
}
// gets website prefixed by http or https use for non-secure pages
function GetHTTPSite()
{
	return "http://"+host;
		
	
}

function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}
