// SET THE STATUS BAR MESSAGE
defaultStatus="Western Pathology Consultants";

//NEW WINDOW FUNCTIONS

var newSmallWindow = null
var newMidWindow = null
var newBigWindow = null

function opensmallWindow(site) {
newSmallWindow = window.open("about:blank", "client1", "width=350,height=200,scrollbars,alwaysRaised,dependent")

newSmallWindow = window.open(site, "client1", "width=350,height=200,scrollbars,alwaysRaised,dependent")
}

function openmidWindow(site) {
newMidWindow = window.open("about:blank", "client2", "width=450,height=350,scrollbars,alwaysRaised,resizable,dependent")

newMidWindow = window.open(site, "client2", "width=450,height=350,scrollbars,alwaysRaised,resizable,dependent")
}
 
function opensquareWindow(site) {
newSquareWindow = window.open("about:blank", "client2", "width=600,height=300,scrollbars,alwaysRaised,resizable,menubar,dependent")

newSquareWindow = window.open(site, "client2", "width=600,height=300,scrollbars,alwaysRaised,resizable,menubar,dependent")
}

function openbigWindow(site) {
newBigWindow = window.open("about:blank", "client3", "width=800,height=600,scrollbars,alwaysRaised,resizable,status=no,toolbar=no,dependent")

newBigWindow = window.open(site, "client3", "width=650,height=600,scrollbars,alwaysRaised,resizable,toolbar,dependent")
}

function opencobrandWindow(site) {

newCobrandWindow = window.open("about:blank", "client3", "width=850,height=550,top=150,left=250,scrollbars,alwaysRaised,resizable,toolbar,dependent")

newCobrandWindow = window.open(site, "client3", "width=850,height=550,top=50,left=50,scrollbars,alwaysRaised,resizable,toolbar,dependent")
}

function opensslWindow(site) {

newSslWindow = window.open("about:blank", "client7", "width=800,height=550,scrollbars,alwaysRaised,resizable=yes,toolbar,status=yes,dependent=no")

newSslWindow = window.open(site, "client7", "width=800,height=550,scrollbars,alwaysRaised,resizable=yes,toolbar,status=yes,dependent=no")
}

function opencrcWindow(site) {
newCrcWindow = window.open("about:blank", "client5", "width=394,height=250,alwaysRaised,toolbar,dependent")

newCrcWindow = window.open(site, "client5", "width=394,height=250,alwaysRaised,toolbar,dependent")
}

function openbannerWindow(site) {
newCrcWindow = window.open("about:blank", "client6", "width=468,height=60,alwaysRaised,toolbar,dependent")

newCrcWindow = window.open(site, "client6", "width=468,height=60,alwaysRaised,toolbar,dependent")
}

function changepage()
{
window.top.location = document.choose.category.options[document.choose.category.selectedIndex].value
}


function removeSpaces(string,text,by) {
// Replaces text with by in string
    var strLength = string.length, txtLength = text.length;
    if ((strLength == 0) || (txtLength == 0)) return string;

    var i = string.indexOf(text);
    if ((!i) && (text != string.substring(0,txtLength))) return string;
    if (i == -1) return string;

    var newstr = string.substring(0,i) + by;

    if (i+txtLength < strLength)
        newstr += removeSpaces(string.substring(i+txtLength,strLength),text,by);

    return newstr;
}

function BWpopup(L,T,W,H,MsgContent) {
var Popup = window.createPopup();
var bod = Popup.document.body;
bod.style.border = "2px solid #FFFFFF";
bod.style.padding = "10px";
bod.style.backgroundColor = "#C4CAAE";
bod.style.color = "#003300"
bod.innerHTML = "<img src='graphics/" + MsgContent + "'>";
Popup.show(L, T, W, H, document.body);
}

var oPopup = window.createPopup();
function openPopup()
{
    // The popup object exposes the document property and all of the document
    // properties.
    var oPopBody = oPopup.document.body;
    // Below the HTML that populates the popup is expressed as a string.
    oPopBody.innerHTML = "<div  style='position:absolute; top:0; left:0; " + 
    "width:240px; height:170px; padding:10px; color:white; font-family:tahoma; " +
     "font-size:13pt;filter:progid:DXImageTransform.Microsoft.Gradient()'> " +
     "<b>This is a popup object</b><hr size='1'>You can continue to type in the " + 
     "box while this window is visible. Click outside of the popup object " + 
     "boundaries to close it.</div>"
    // This popup is displayed relative to the body of the document.
    oPopup.show(290, 190, 240, 170, document.body);
}
