﻿// JScript File
function textareaLimit(taObj, iMax, counter) {
    if (taObj.value.length >= iMax) 
    { 
        taObj.value = taObj.value.substr(0,iMax-1); 
    }
    if (counter!="") {
        theCountBox = document.getElementById(counter);
        theCountBox.value = taObj.value.length+1;
    }
}

function hideBorders() {
    var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
    var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
    if (isIE && isWin) {
        document.createStyleSheet('css/ie_styles.css');
    }
}

function popUp(URL) {
id = 'popup';
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=503,height=540');");
eval("page" + id + ".focus()");
}

function popUpInnovations(URL) {
id = 'popup';
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=680,height=725');");
eval("page" + id + ".focus()");
}

function popUpYoutube(URL) {
id = 'popup';
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=655,height=400');");
eval("page" + id + ".focus()");
}

function popUpFloor(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=483,height=539');");
eval("page" + id + ".focus()");
}

function popUpFloorPlan(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=786,height=614');");
eval("page" + id + ".focus()");
}

function popUpJobPosting(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, 'JobPosting', 'toolbar=0,scrollbars=1,location=1,statusbar=0,menubar=1,resizable=1,width=800,height=614');");
eval("page" + id + ".focus()");
}