﻿


function doPopUp(url) {
    if(url.indexOf("facebook.com") > 0)
    {
        pop = window.open(url, 'popup', 'toolbar=0,status=0,width=626,height=436');
    }
    else if(url.indexOf("twitter.com") > 0)
    {
        pop = window.open(url, 'popup', 'toolbar=0,status=0,width=800,height=550');
    }
    else
    {
        pop = window.open(url, 'popup', 'toolbar=0,status=0,width=400,height=300,scrollbars=yes');
    }
    pop.focus();
}

function getObjInnerText(obj) {

    var nAgt = navigator.userAgent;


    if (nAgt.indexOf("MSIE") != -1) { // IE; 
        return obj.innerText;
    }
    else {
        if (nAgt.indexOf("Firefox") != -1 || nAgt.indexOf("Safari")) {
            return obj.textContent;
        }
        else
            alert("Error: This application does not support your browser. Try again using IE or Firefox.");
    }
}

function setObjInnerText(obj, value) {
    var nAgt = navigator.userAgent;


    if (nAgt.indexOf("MSIE") != -1) { // IE; 
        obj.innerText = value;
    }
    else {
        if (nAgt.indexOf("Firefox") != -1 || nAgt.indexOf("Safari")) {
            obj.textContent = value;
        }
        else
            alert("Error: This application does not support your browser. Try again using IE or Firefox.");
    }
}

function gup(name) {
    name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
    var regexS = "[\\?&]" + name + "=([^&#]*)";
    var regex = new RegExp(regexS); var results = regex.exec(window.location.href);
    if (results == null) return ""; else return results[1];
}



