// SET THE STATUS BAR MESSAGE
defaultStatus="New Urban West, Inc.";

//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=650,height=600,scrollbars,alwaysRaised,resizable,toolbar,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;
}
