//Handle on resize events
window.onresize= resizeWin;
function resizeWin()
{
    windowWidth= GetWidth();
    windowHeight = GetHeight();       
    
    if (windowWidth < 997)
    {
    	showLayer("leftCol", false);
    	showLayer("rightCol", false);    	
    }
    else
    {
        showLayer("leftCol", true);
    	showLayer("rightCol", true);    	
    }

}

function getURLParam(){
    var strReturn = "";
    var strHref = window.location.href;
    var frameMenu = window.document.getElementById('TopFrame');

    if ( strHref.indexOf("?") > -1 )
    {
        var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase() ;
        strReturn = strQueryString;
        frameMenu.src = "/UserControls/PagesContent/index.aspx" + strReturn ; 
        return false;
    }
    else
    {
        frameMenu.src = "/UserControls/PagesContent/index.aspx";
    }

    resizeWin();

}

//Show Hide layer (status -> false ==> Hide Layer)
function showLayer(layerID, status)
{
    var layer = window.document.getElementById(layerID);
    if( status )
    {       
        layer.style.display = '';
    }
    else
    {
        layer.style.display = 'none';
    } 
}

//Get the window width and height in JavaScript using a cross-browser function that works with all versions of Internet Explorer and Firefox.
function GetWidth()
{
    var x = 0;
    if (self.innerHeight)
    {
        x = self.innerWidth;
    }
    else if (document.documentElement && document.documentElement.clientHeight)
    {
        x = document.documentElement.clientWidth;
    }
    else if (document.body)
    {
        x = document.body.clientWidth;
    }
    return x;
}
 
function GetHeight()
{
    var y = 0;
    if (self.innerHeight)
    {
        y = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight)
    {
        y = document.documentElement.clientHeight;
    }
    else if (document.body)
    {
        y = document.body.clientHeight;
    }
    return y;
}

function printThisPage()
{
var Content = "<head><link rel=stylesheet type=text/css href='/Style Library/en-us/Core Styles/Band.css'></head>";
//var contentText = document.getElementById('content').innerHTML;
//var Content = paul + "<br/><br>" + Content;
Content += document.getElementById('contentCol').innerHTML;
var contentPrint = window.open('','Content');
contentPrint.document.open();
contentPrint.document.write(Content);
contentPrint.document.close();
contentPrint.print();
}


/********************************* send to friend ******************************/
    function sendit2(){ 
        var thispage=location.href; 
        var pagename=prompt("What e-mail address do you want to send the page to?",""); 
        window.open("mailto:"+pagename+"?Subject=Check out this neat page&body="+thispage,"_self");} 
     function Sendit(){ 
	 if (navigator.appName == 'Firefox'){sendit2()} else
 if (navigator.appName == 'Netscape') {sendit2()} else{ 
   if (navigator.appName == 'Microsoft Internet Explorer') {sendit2()} 
            else {alert("Unfortunately your browser, "+navigator.appName+ ", does not support this feature. Please use the \n File » Send » Link by Email...\n menu option to send the page");}} }//--> 
          

