var OpenWindow = ""

//************************************************************************************************
function OpenWin(address,width,height,scrollbars,resizable)
{
	var w = 480, h = 340;
	
	if (document.all || document.layers)
	{
	   w = screen.availWidth;
	   h = screen.availHeight;
	}
	
	var popW = width, popH = height;
	
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	
	if(OpenWindow)
	{
		if(!OpenWindow.closed)
		{
			OpenWindow.close();
		}
	}
	OpenWindow = window.open(address,'_win','width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos + ',scrollbars=' + scrollbars + ',resizable=' + resizable + ',status=1,toolbar=0,location=0,menubar=0,directories=0');
	OpenWindow.focus();
}

function CloseWin()
{
	if(OpenWindow)
	{
		if(!OpenWindow.closed)
		{
			OpenWindow.close();
		}
	}
}

// JScript source code
function fnSetValues(){
   var iHeight=340;
   var iWidth=415;
   var sFeatures="dialogHeight: " + iHeight + "px;dialogWidth: "+iWidth + "px;";
   return sFeatures;
}
function fnOpen(){
   var sFeatures=fnSetValues();
   window.name="chMainWin"
   window.showModalDialog("logins/default.aspx", "", sFeatures)
}
function fnClose(){
   window.open("../default.aspx","chMainWin");
   window.close();
}

var url = window.location.href;
var gaid = 0;

if (url.indexOf("cheerpowerhotels.com")>-1) {
    gaid=1;
}
if (url.indexOf("acacheerhotels.com")>-1) {
    gaid=2;
}
if (url.indexOf("championhousinglive.com")>-1) {
    gaid=3;
}
if (url.indexOf("the-teamhotels.biz")>-1) {
    window.status="Google the-teamhotels.biz...";
    gaid=4;
}
if (url.indexOf("floridathespianshotels.com")>-1) {
    gaid=5;
}
if (url.indexOf("ehglive.com")>-1) {
    gaid=6;
}
if (url.indexOf("uslhotels.com")>-1) {
    gaid=7;
}

if (gaid>0) {
    document.write("<script src='http://www.google-analytics.com/urchin.js' type='text/javascript'></script>\n");
    document.write("<script type='text/javascript'>\n");
    document.write("_uacct = 'UA-962974-"+gaid+"';\n");
    document.write("urchinTracker();\n");
    document.write("</script>\n");
}
