﻿
function LoadSignup(emailaddr, height, width)
{
    var strURL = ""
    if (emailaddr == "Your Email Address") { emailaddr = ""; }
    strURL = "/Newsletter-Sign-Up.aspx?email=" + emailaddr;
    GB_showCenter("", strURL, height, width);
} 

function urlencode(str) {
return escape(str).replace(/\+/g,"%2B").replace(/%20/g, "+").replace(/\*/g, "%2A").replace(/\//g, "%2F").replace(/@/g, "%40");
}

function GreyboxVR(swf)
{
    var strURL = "/PopUpVR.aspx?swf=" + swf
    GB_showCenter("", strURL, 310, 610);
} 


function GreyboxWithLinkVR(link)
{
    GB_showCenter("", link, 290, 400);
}

function LoadVideoPopupPlayer(url, vid) {
    PlayGreyboxVideo(url);
}

function PlayGreyboxVideo(template) {
    var width = 827;
    var height = 497;

    if ($.browser.msie) {
        if (jQuery.browser.version == "6.0" || jQuery.browser.version == "7.0") {
            width = 840;
            height = 509;
        }
    }

    GB_showCenter("", template, height, width);
}

// play a new video.
function playVideo(video)
{
    getSWF("videoPlayer").playVideo(video);
}

// get the SWF by id name.
function getSWF(id)
{
return $get(id);
    if(navigator.appName.indexOf("Microsoft") != -1)
        return window[id];
    else
        return document[id];
}

//get querystring param with javascript
function querySt(ji) {
    hu = window.location.search.substring(1);
    gy = hu.split("&");
    for (i = 0; i < gy.length; i++) {
        ft = gy[i].split("=");
        if (ft[0] == ji) {
            return ft[1];
        }
    }
}
