var browserName=navigator.appName; var firefoxViewer=false;var ieViewer=true;var isTest = false;/*This should be set to true only during development time only.basically what it does is get the latest css, js and other data from the server without the need to refresh the browser.*/if(isTest){    includeLiveJs();}if (browserName=="Netscape") {    firefoxViewer=true;    ieViewer=false;} else if (browserName=="Microsoft Internet Explorer") {    firefoxViewer=false;    ieViewer=true;}function includeLiveJs() {document.write('<scr' + 'ipt type="text/javascript" src="js/Live.js"></scr' + 'ipt>');}function openPopupWindow(url) {      childWindow = window.open(url,"newWindow","location=no,scrollbars=yes,status=yes,height=300,width=400,modal=yes,top=250,left=300");    if (childWindow) {        childWindow.focus()    }    return childWindow;}function openPopupWindowWithWinSize(url, height, width) {    childWindow = window.open(url,"newWindow","location=no,scrollbars=yes,status=yes,height="+height+",width="+width+",modal=yes,top=250,left=300");    if (childWindow) {        childWindow.focus()    }    return childWindow;}function fcsOnMe(){    if (!skipcycle){        window.focus();     }    mytimer = setTimeout('fcsOnMe()', 500);}function closePopupAndRefreshWindow() {    // window.opener.top.frames[1].location.reload(true);    window.opener.top.frames[1].frames[1].location='competitors.details.do';    //window.opener.top.frames[1].frames[1].location.reload(true);    self.close();}function closePopupAndRefreshUserAdminWindow() {    window.opener.top.frames[1].frames[1].location='userAdministration.do';    self.close();}function ConfirmClose(actionValue) {    if ((event.clientY < 0)||(event.clientX >350)) {        myclose=true;        window.opener.top.frames[1].frames[1].location=actionValue;        setTimeout('myclose=true',1000);    }}function showInlineWindow(obj,fieldId,width,height){    //Remove other popup if there are any.    clearPopups();    // create and open an inline popup    var popup =  new PopUp(fieldId, obj, width, height);    popup.open();    openedPopupQueue.push(fieldId);    var closePopup = document.createElement('Span');    closePopup.style.textDecoration  = 'underline';    closePopup.style.cursor='hand';	closePopup.onclick = clearPopups;	closePopup.id = 'closePoupUp';	closePopup.innerHTML = 'X-Close';    popup.div.appendChild(closePopup);    var disc = document.createElement('div');    disc.innerHTML = document.getElementById(fieldId).value;    popup.div.appendChild(disc);    popup.setNewPosition();  //  popup.resize();}function isInteger (s){    var i;    if (isEmpty(s))        if (isInteger.arguments.length == 1) return 0;        else return (isInteger.arguments[1] == true);    for (i = 0; i < s.length; i++)    {        var c = s.charAt(i);        if (!isDigit(c)) return false;    }    return true;}function isEmpty(s) {    return ((s == null) || (s.length == 0))}function isDigit (c) {    return ((c >= "0") && (c <= "9"))}function isDate(sDate) {    var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/    if (re.test(sDate)) {        var dArr = sDate.split("/");        var d = new Date(sDate);        return d.getMonth() + 1 == dArr[0] && d.getDate() == dArr[1] && d.getFullYear() == dArr[2];    } else {        return false;    }}function doDateCheck(from, to) {    if (Date.parse(from) > Date.parse(to)) {        return false;    }    return true;}function trimString(inputString) {    if (typeof inputString != "string") {        return inputString;    }    var retValue = inputString;    var ch = retValue.substring(0, 1);    while (ch == " ") {        retValue = retValue.substring(1, retValue.length);        ch = retValue.substring(0, 1);    }    ch = retValue.substring(retValue.length-1, retValue.length);    while (ch == " ") {        retValue = retValue.substring(0, retValue.length-1);        ch = retValue.substring(retValue.length-1, retValue.length);    }    while (retValue.indexOf("  ") != -1) {        retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length);    }    return retValue;}
