function showPrices() {
    if(document.all)
        form = document.forms[0]
    else if(document.layers) {
        form = document.form1html.document.forms[0]
    }
    if(form.ASXCodes != null) {
        var submitASXCodes = escape( form.ASXCodes.value )
        submitString = "/asx/markets/priceLookup.do?by=asxCodes&asxCodes="+submitASXCodes
        remoteWin = window.open(submitString, "Prices","top=0,left=0,width=" + (getWidth()*0.8) + ",height=" + (getHeight()*0.75) + ",scrollbars=yes,resizable=yes,toolbar=yes,menubar=yes,location=yes,toolbar=yes")
    }
    else {
        alert("Please enter at least one ASX code");
    }
}

function showAnnouncement() {
    if(document.all)
        form = document.forms[0]
    else if(document.layers) {
        form = document.form1html.document.forms[0]
    }
    if(form.ASXCode != null) {
        var submitASXCodes = escape( form.ASXCode.value )
        submitString = "/asx/statistics/announcementSearch.do?method=searchByCode&issuerCode="+submitASXCodes
        remoteWin = window.open(submitString, "Announcements","top=0,left=0,width=" + (getWidth()*0.8) + ",height=" + (getHeight()*0.75) + ",scrollbars=yes,resizable=yes,toolbar=yes,menubar=yes,location=yes")
    }
    else {
        alert("Please enter an ASX code");
    }

}

function startRemote(url, popupName) {
    url = escape(url);
    //popupName = escape(popupName);
    remoteWin = window.open(url, popupName, "top=0,left=0,width=" + (getWidth()*0.8) + ",height=" + (getHeight()*0.75) + ",scrollbars=yes,resizable=yes,toolbar=yes,menubar=yes,location=yes")
 }
 
/*
 * Display an announcement PDF in a popup window.
 *
 * url:			The IDS id of the announcement to display.
 * popupName	The name to give the popup window.
 */
function getAnnPdf(showPdfUrl, idsID, popupName)
{
	myUrl = showPdfUrl + idsID;
        remoteWin = window.open(myUrl, popupName, "top=0,left=0,width=790,height=700,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no");
}

/* old getAnnPdf fuction
function getAnnPdf(url, popupName) {
     remoteWin = window.open(url, popupName, "top=0,left=0,width=" + (getWidth()*0.8) + ",height=" + (getHeight()*0.75) + ",scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no")
 }
end old function */ 

function startRemote(url, popupName, width, height) {
	width = getWidth();
	height = getHeight();
    remoteWin = window.open(url, popupName, "top=0,left=0,width=" + (getWidth()*0.8) + ",height=" + (getHeight()*0.75) + ",scrollbars=yes,resizable=yes,toolbar=yes,menubar=yes,location=yes")
 }

function getWidth() {
    var resize = '';                            // Set the defaults
    var titlebar = '';
    var wvalue = screen.width - 7;
    var hvalue = screen.height - 75;
    
    if (navigator.appName == 'Netscape') {  // Netscape
        if (screen.height >= 600) {         // 800 x 600 or greater
            wvalue = 798;
            hvalue = 572;
        } else {                            // 640 x 480
            hvalue = hvalue - 2;
        }       
    }
    return wvalue
}

function getHeight() {
    var resize = '';                            // Set the defaults
    var titlebar = '';
    var wvalue = screen.width - 7;
    var hvalue = screen.height - 75;
    
    if (navigator.appName == 'Netscape') {  // Netscape
        if (screen.height >= 600) {         // 800 x 600 or greater
            hvalue = 572;
        } else {                            // 640 x 480
            hvalue = hvalue - 2;
        }       
    }
    return hvalue
}

function ShowInfo(url, title) {
    window.open(url, title,"top=0,left=0,width=500,height=350,scrollbars=yes,resizable=yes")
}

function ShowColumn(url, title) {
    window.open(url, title,"top=0,left=0,width=500,height=350,scrollbars=yes,resizable=yes")
}

