
var opened=" ";

var BV = parseInt(navigator.appVersion);
var BN = "";

function doSubmit(proc)
{
	document.forms[1].h_PROC.value = proc;
	document.forms[1].submit();
}


function doPopup(thisURL,thisWidth,thisHeight,winName)
{
	winName = ( winName > '') ? winName : 'popupWindow';
	attrib = "'history=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=no,width=" + thisWidth + ",height=" + thisHeight+"'";
        popupWin = window.open(thisURL,winName,attrib);
	popupWin.focus();
}

function popFreeCopy(thisURL,thisWidth,thisHeight,winName)
{
        winName = ( winName > '') ? winName : 'freeCopyWindow';
        attrib = "'history=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=no,width=" + thisWidth +
",height=" + thisHeight+"'";
        freeCopyWin = window.open(thisURL,winName,attrib);
        freeCopyWin.focus();
}

function getWord(word)
{
        thisURL = "/cgi-bin/glosDesc?word=" + word;
	winName = "wordWindow";
	attrib = "history=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=no,width=300,height=200";
        wordWin = window.open(thisURL,winName,attrib);
	wordWin.focus();
}

function freeMag()
{
        thisURL = "/cgi-bin/freecopy";
        winName = "magWindow";
        attrib = "history=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=no,width=450,height=320";
        magWin = window.open(thisURL,winName,attrib);
        magWin.focus();
}

function openIT() {
	theURL="http://www.getyourmoneyworking.com/portfolio.html"
	wname ="CHROMELESSWIN"
	W=771;
	H=561;
	windowCERRARa 		= "http://www.getyourmoneyworking.com/dev/img/close_a.gif"
	windowCERRARd 		= "http://www.getyourmoneyworking.com/dev/img/close_d.gif"
	windowCERRARo 		= "http://www.getyourmoneyworking.com/dev/img/close_o.gif"
	windowNONEgrf 		= "http://www.getyourmoneyworking.com/dev/img/none.gif"
	windowCLOCK		= "http://www.getyourmoneyworking.com/dev/img/clock.gif"
	windowREALtit		= "  Task title"
	windowTIT 	    	= "<font face=verdana size=1>&nbsp;  getyourmoneyworking.com :: quotestream</font>"
	windowBORDERCOLOR   	= "#000000"
	windowBORDERCOLORsel	= "#999999"
	windowTITBGCOLOR    	= "#999999"
	windowTITBGCOLORsel 	= "#333333"
	openchromeless(theURL, wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, windowNONEgrf, windowCLOCK, windowTIT, windowREALtit , windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel)
}

function openFOREX() {
	theURL="http://www.oanda.com/convert/classic?user=gymwcom"
	wname ="CHROMELESSWIN"
	W=660;
	H=585;
	windowCERRARa 		= "http://www.getyourmoneyworking.com/dev/img/close_a.gif"
	windowCERRARd 		= "http://www.getyourmoneyworking.com/dev/img/close_d.gif"
	windowCERRARo 		= "http://www.getyourmoneyworking.com/dev/img/close_o.gif"
	windowNONEgrf 		= "http://www.getyourmoneyworking.com/dev/img/none.gif"
	windowCLOCK		= "http://www.getyourmoneyworking.com/dev/img/clock.gif"
	windowREALtit		= "  Task title"
	windowTIT 	    	= "<font face=verdana size=1>&nbsp;  getyourmoneyworking.com :: currency convertor</font>"
	windowBORDERCOLOR   	= "#000000"
	windowBORDERCOLORsel	= "#999999"
	windowTITBGCOLOR    	= "#999999"
	windowTITBGCOLORsel 	= "#333333"
	openchromeless(theURL, wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, windowNONEgrf, windowCLOCK, windowTIT, windowREALtit , windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel)
}

function applyOnline()
{
        thisURL = "/cgi-bin/tradeonline";
        winName = "magWindow";
        attrib = "history=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=no,width=430,height=350";
        magWin = window.open(thisURL,winName,attrib);
        magWin.focus();
}

function getPic(thisURL,thisWidth,thisHeight)
{
	winName = 'picWindow';
        attrib = "'history=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=no,width=" + thisWidth +
",height=" + thisHeight+"'";
        picWin = window.open(thisURL,winName,attrib);
        picWin.focus();
}

function openWindow(what2open,winName,winOptions){
  var url = what2open;
  var name = winName;
  var options = winOptions;
  popupWin = window.open(url,name,options);
  popupWin.opener.top.name="opener";
  popupWin.focus();
}

function popQuote(whichSymbol){
  var symbol = whichSymbol;
  var winName = 'popQuote';
  var what2open = 'http://www.prophetfinance.com/myfolio/liveQuotePopup.asp?symbol='+symbol;
  var winOptions='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=505,height=350';
  openWindow(what2open,winName,winOptions);
}

var eCookie = document.cookie;

function getCookie(cookieName) { 
        var beginStr = eCookie.indexOf(cookieName + "=");

        if ( beginStr == -1 ) return null;

        beginStr = eCookie.indexOf("=", beginStr) + 1;
        var endStr = eCookie.indexOf(";", beginStr);
        if (endStr == -1) endStr = eCookie.length;
        return unescape(eCookie.substring(beginStr, endStr));
}

  var today = new Date();
  //var expiry = new Date(today.getTime() +  4 * 60 * 60 * 1000); // plus 4 Hours
  var expiry = new Date(today.getTime() +  30 * 60 * 1000); // plus 30 mins

function setCookie(cookieName, cookieValue, cookieExpire) {
        if (cookieValue != null && cookieValue != "") {
          document.cookie = cookieName + "=" + escape(cookieValue) + 
                            ( (cookieExpire == null) ? "" : "; expires =" + expiry.toGMTString());
        }
        eCookie = document.cookie;
}

function deleteCookie (cookieName)
{  
        if (getCookie(cookieName)) {
            document.cookie = cookieName + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
        }
}




