
// constants

var newURL = location.protocol + '//' + location.host; //https:

var sWidth = 800;
var sHeight = 600;


function openWindow(winName)
	{
	    var openURL = newURL + "/Default2.aspx";

    // comment out below line to deactive dove temporarily
    //openURL = 'https://'+ location.host + '/maintenance_index.htm';

    try { sWidth = screen.width * 0.9; } catch(ex){}
    try { sHeight = screen.height * 0.9; } catch(ex){}

    if (self.name == winName) 
    {
	    self.location.href = newURL;
		self.focus();
	}
	else
    {
		var popup = window.open(openURL,winName,'width='+ sWidth +',height='+ sHeight +',directories=false,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes');
		popup.focus();

		if(navigator.appName=="Microsoft Internet Explorer") 
	          { window.opener='x'; } 

		window.open('','_parent','');
        window.close();
    }
	return false;
}

function ChatPop(cid)
{
    var strURL;
    strURL = newURL + '/ChatRoom.aspx?ChatRoomId=' + cid;
    try { sWidth = screen.width * 0.7; } catch(ex){}
    try { sHeight = screen.height * 0.7; } catch(ex){}
    window.location.href=strURL;    // this change was amde to allow for support even if popups blocked
    //var popup = window.open(strURL,cid,'width='+ sWidth +',height='+ sHeight +',directories=false,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes');
                
    return false;
}

