// JavaScript Document
function Pointer(source)
{
 // change the mouse cursor to show hand
 source.style.cursor = 'hand';
}
function openbook(mybook) {
  if (parent.user("login")=="true"){ 
    window.open(mybook, "mainFrame"); }
  else {
    forcelogin("Guest Book");}
}
function PopupWindow(strPageOpen, strPageBanner)
{
 // Set window features for the popup window
 var strWindowFeatures = "toolbar=no,resize=no,titlebar=no,";
 strWindowFeatures = strWindowFeatures + 
"location=no,directories=no,status=no,scrollbars=yes,"
 strWindowFeatures = strWindowFeatures +
"menubar=no,width=500,height=250,maximize=null";
 // Open the window
 window.open(strPageOpen,'mainFrame',strWindowFeatures);
 window.open(strPageBanner,'BannerWin',strWindowFeatures);
}
function GoPage(strPageOpen)
{
    window.open(strPageOpen, "_blank");
}
function GoMessage()
{
 if (User.login=="True"){ 
	 var strWindowFeatures = "toolbar=no,resize=no,titlebar=no,";
	 strWindowFeatures = strWindowFeatures +
	"location=no,directories=no,status=no,scrollbars=no,"
	 strWindowFeatures = strWindowFeatures +
	"menubar=no,width=680,height=460,maximize=null";
	 window.open('csmc/Messenger.aspx','mailpop', strWindowFeatures);
 }
 else {
     forcelogin("CS Message Center"); }
}
function forcelogin(lgnmsg) {
	 var msg = "You must login in to \"Cityshakes\" to use the " + lgnmsg + "! \n Click OK to login into the Message Center?";
	 var res = confirm(msg);
	 if (res == true)
	     window.open('/login.aspx?returnurl="/default.aspx', 'mainFrame');
}
function GoLounge(usr) {
    var strChatroom = "http://lounge.cityshakes.ca/default.aspx?web=cityshakes&chat_name=" + usr;
    var strWindowFeatures = "toolbar=no,resize=no,titlebar=no,";
    strWindowFeatures += "location=no,directories=no,status=yes,scrollbars=no,";
    strWindowFeatures += "menubar=no,width=790,height=480,maximize=null";
    window.open(strChatroom, 'citychat', strWindowFeatures);
}
function GoChat(usr) {
    if (usr.login == "True") {
        var strChatroom = "http://lounge.cityshakes.ca/default.aspx?web=cityshakes&chat_name=" + usr.name;
        var strWindowFeatures = "toolbar=no,resize=no,titlebar=no,";
        strWindowFeatures += "location=no,directories=no,status=yes,scrollbars=no,";
        strWindowFeatures += "menubar=no,width=790,height=480,maximize=null";
        window.open(strChatroom, 'citychat', strWindowFeatures);
    }
    else {
        forcelogin("Chat Room");
    }
}
function GoLiveChat(usr, tsk) {
    var strChatroom = "/livechat/default.aspx?chatto=" + usr + "&tsk=" + tsk;
    var strWindowFeatures = "toolbar=no,resize=no,titlebar=no,";
    strWindowFeatures += "location=no,directories=no,status=yes,scrollbars=no,";
    strWindowFeatures += "menubar=no,width=600,height=500,maximize=null";
    window.open(strChatroom, '_blank', strWindowFeatures);
}
function GoVChat(usr) {
    var strChatroom = "http://lounge.cityshakes.ca/default.aspx?web=cityshakes&chat_name=" + usr + "&vu=y";
    var strWindowFeatures = "toolbar=no,resize=no,titlebar=no,";
    strWindowFeatures += "location=no,directories=no,status=yes,scrollbars=no,";
    strWindowFeatures += "menubar=no,width=790,height=480,maximize=null";
    window.open(strChatroom, 'citychat', strWindowFeatures);
}
function GoShoutOut() {
    var strWindowFeatures = "toolbar=no,resize=no,titlebar=no,";
    strWindowFeatures += "location=no,directories=no,status=no,scrollbars=no,";
    strWindowFeatures += "menubar=no,width=720,height=420,maximize=null";
    window.open('/addshoutouts.aspx', '_blank', strWindowFeatures);
}
function GoVShoutOut(uname) {
    var strWindowFeatures = "toolbar=no,resize=no,titlebar=no,";
    strWindowFeatures += "location=no,directories=no,status=no,scrollbars=no,";
    strWindowFeatures += "menubar=no,width=720,height=420,maximize=null";
    var nwin = "/addshoutouts.aspx?vu=y&n=" + uname;
    window.open(nwin, '_blank', strWindowFeatures);
}
function Gotellafriend()
{
 var strWindowFeatures = "toolbar=no,resize=no,titlebar=no,";
 strWindowFeatures = strWindowFeatures +
"location=no,directories=no,status=no,scrollbars=no,";
 strWindowFeatures = strWindowFeatures +
"menubar=no,width=580,height=420,maximize=null";
 window.open('tellafriend.asp','bt_main', strWindowFeatures);
}
function PopupCards(strCard, strCardTitle, strCardlink)
{
 // Set window features for the popup window
 var strWindowFeatures = "toolbar=no,resize=no,titlebar=no,";
 strWindowFeatures = strWindowFeatures + 
"location=no,directories=no,status=no,scrollbars=no,"
 strWindowFeatures = strWindowFeatures +
"menubar=no,width=540,height=300,maximize=null";
var strPopups = "images/logo/popuplogo.aspx?Card=" + strCard + "&cardtitle=" + strCardTitle + "&cardlink=" + strCardlink;
 // Open the window
 window.open(strPopups,'popwin',strWindowFeatures);
}
function GoTV(strWindowToOpen, strContent, strBanner)
{
	var strWindowFeatures = "toolbar=no,resize=no,titlebar=no,";
	strWindowFeatures = strWindowFeatures + "location=no,directories=no,status=no,scrollbars=yes," 
	strWindowFeatures = strWindowFeatures + "menubar=no,width=400,height=250,maximize=null";
	window.open(strBanner,'BannerWin', strWindowFeatures);
	window.open(strWindowToOpen,'bt_main', strWindowFeatures);
	window.open(strContent,'contents', strWindowFeatures);
}
function popupTV(strWindowToOpen, strBanner)
{
	document.banner.src = "images/Banner/" + strBanner
	var strWindowFeatures = "toolbar=no,resize=no,titlebar=no,";
	strWindowFeatures = strWindowFeatures + "location=no,directories=no,status=no,scrollbars=no," 
	strWindowFeatures = strWindowFeatures + "menubar=no,width=733,height=355,maximize=null";
	window.open(strWindowToOpen,'livetv', strWindowFeatures);
}
