function showEmailPopUp(e) {
		
	var posx = 0;
	var posy = 0;

	var scrolly = (document.documentElement) ? document.documentElement.scrollTop : window.pageYOffset
	var scrollx = (document.documentElement) ? document.documentElement.scrollLeft : window.pageXOffset
	
	var myWidth = 0, myHeight = 0;
	
	if( typeof( window.innerWidth ) == 'number' ) {
	    	//Non-IE
	  	  myWidth = window.innerWidth;
	  	  myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	    	//IE 6+ in 'standards compliant mode'
	    	myWidth = document.documentElement.clientWidth;
	  	myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	   	//IE 4 compatible
	    	myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
  	}
	
	posy = scrolly+((myHeight-508)/2);
	posx = scrollx+((myWidth-440)/2);
	
	var popUpLayer = document.getElementById('emailHover');
	popUpLayer.style.top = posy + 'px';
	popUpLayer.style.left = posx + 'px';
	popUpLayer.style.display = 'block';
	grayOut(true);	
			
}
function hideEmailPopUp() {
	var popUpLayer = document.getElementById('emailHover');
	popUpLayer.style.display='none';
	grayOut(false);
}
function showPopUp(e) {
		
	var posx = 0;
	var posy = 0;

	var scrolly = (document.documentElement) ? document.documentElement.scrollTop : window.pageYOffset
	var scrollx = (document.documentElement) ? document.documentElement.scrollLeft : window.pageXOffset
	
	var myWidth = 0, myHeight = 0;
	
	if( typeof( window.innerWidth ) == 'number' ) {
	    	//Non-IE
	  	  myWidth = window.innerWidth;
	  	  myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	    	//IE 6+ in 'standards compliant mode'
	    	myWidth = document.documentElement.clientWidth;
	  	myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	   	//IE 4 compatible
	    	myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
  	}
	
	posy = scrolly+((myHeight-608)/2);
	posx = scrollx+((myWidth-690)/2);
	
	var popUpLayer = document.getElementById('photosHover');
	popUpLayer.style.top = posy + 'px';
	popUpLayer.style.left = posx + 'px';
	popUpLayer.style.display = 'block';
	grayOut(true);
			
}
function hidePopUp() {
	var popUpLayer = document.getElementById('photosHover');
	popUpLayer.style.display='none';
	grayOut(false);
}
function showUsedByPopUp() {
    var popUpLayer = document.getElementById('usedByHover');
    popUpLayer.style.display='block';
}
function hideUsedByPopUp() {
	var popUpLayer = document.getElementById('usedByHover');
	popUpLayer.style.display='none';
}

function showClubOver() {
    var popUpLayer = document.getElementById('clubHover');
    popUpLayer.style.display='block';
}

function hideClubOut() {
    var popUpLayer = document.getElementById('clubHover');
    popUpLayer.style.display='none';
}

function showCoursePopUp(e) {
		
	var posx = 0;
	var posy = 0;

	var scrolly = (document.documentElement) ? document.documentElement.scrollTop : window.pageYOffset
	var scrollx = (document.documentElement) ? document.documentElement.scrollLeft : window.pageXOffset
	
	var myWidth = 0, myHeight = 0;
	
	if( typeof( window.innerWidth ) == 'number' ) {
	    	//Non-IE
	  	  myWidth = window.innerWidth;
	  	  myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	    	//IE 6+ in 'standards compliant mode'
	    	myWidth = document.documentElement.clientWidth;
	  	myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	   	//IE 4 compatible
	    	myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
  	}
	
	posy = scrolly+((myHeight-428)/2);
	posx = scrollx+((myWidth-540)/2);
	
	var popUpLayer = document.getElementById('courseHover');
	popUpLayer.style.top = posy + 'px';
	popUpLayer.style.left = posx + 'px';
	popUpLayer.style.display = 'block';	
			
}
function hideCoursePopUp() {
	var popUpLayer = document.getElementById('courseHover');
	popUpLayer.style.display='none';
}
function showRollOver() {
    var popUpLayer = document.getElementById('tvHover');
    popUpLayer.style.display='block';
    
}
function hideRollOver() {
	var popUpLayer = document.getElementById('tvHover');
	popUpLayer.style.display='none';
}
function videoLoginPop() {
    var posx = 0;
	var posy = 0;

	var scrolly = (document.documentElement) ? document.documentElement.scrollTop : window.pageYOffset
	var scrollx = (document.documentElement) ? document.documentElement.scrollLeft : window.pageXOffset
	
	var myWidth = 0, myHeight = 0;
	
	if( typeof( window.innerWidth ) == 'number' ) {
	    	//Non-IE
	  	  myWidth = window.innerWidth;
	  	  myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	    	//IE 6+ in 'standards compliant mode'
	    	myWidth = document.documentElement.clientWidth;
	  	myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	   	//IE 4 compatible
	    	myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
  	}
	
	posy = scrolly+((myHeight-420)/2);
	posx = scrollx+((myWidth-577)/2);
	
	var popUpLayer = document.getElementById('videoLogin');
	popUpLayer.style.top = posy + 'px';
	popUpLayer.style.left = posx + 'px';
	popUpLayer.style.display = 'block';
	grayOut(false);	
	
	var player = document.getElementById('player');
	player.style.visibility = 'hidden';
}
function hideVideoLogin(){
    var popUpLayer = document.getElementById('videoLogin');
	popUpLayer.style.display='none';
	grayOut(false);
}


function grayOut(vis, options) {
  // Pass true to gray out screen, false to ungray
  // options are optional.  This is a JSON object with the following (optional) properties
  // opacity:0-100         // Lower number = less grayout higher = more of a blackout 
  // zindex: #             // HTML elements with a higher zindex appear on top of the gray out
  // bgcolor: (#xxxxxx)    // Standard RGB Hex color code
  // grayOut(true, {'zindex':'50', 'bgcolor':'#0000FF', 'opacity':'70'});
  // Because options is JSON opacity/zindex/bgcolor are all optional and can appear
  // in any order.  Pass only the properties you need to set.
  var options = options || {}; 
  var zindex = options.zindex || 50;
  var opacity = options.opacity || 60;
  var opaque = (opacity / 100);
  var bgcolor = options.bgcolor || '#000000';
  var dark=document.getElementById('darkenScreenObject');
  var selects = document.getElementsByTagName("select"); 
    for (i = 0; i != selects.length; i++) 
        { 
            selects[i].style.visibility = "hidden"; 
        }    
  if (!dark) {
    // The dark layer doesn't exist, it's never been created.  So we'll
    // create it here and apply some basic styles.
    // If you are getting errors in IE see: http://support.microsoft.com/default.aspx/kb/927917
    var tbody = document.getElementsByTagName("body")[0];
    var selects = document.getElementsByTagName("select"); 
    for (i = 0; i != selects.length; i++) 
        { 
            selects[i].style.visibility = "hidden"; 
        }    
    var tnode = document.createElement('div');           // Create the layer.
        tnode.style.position='absolute';                 // Position absolutely
        tnode.style.top='0px';                           // In the top
        tnode.style.left='0px';                          // Left corner of the page
        tnode.style.overflow='hidden';                   // Try to avoid making scroll bars            
        tnode.style.display='none';                      // Start out Hidden
        tnode.id='darkenScreenObject';                   // Name it so we can find it later

    tbody.appendChild(tnode);                            // Add it to the web page
    
    dark=document.getElementById('darkenScreenObject');  // Get the object.
  }
  if (vis) {
    // Calculate the page width and height 
    if( document.body && ( document.body.scrollWidth || document.body.scrollHeight ) ) {
        var pageWidth = document.body.scrollWidth+'px';
        var pageHeight = document.body.scrollHeight+'px';
    } else if( document.body.offsetWidth ) {
      var pageWidth = document.body.offsetWidth+'px';
      var pageHeight = document.body.offsetHeight+'px';
    } else {
       var pageWidth='100%';
       var pageHeight='100%';
    }   
    //set the shader to cover the entire page and make it visible.
    dark.style.opacity=opaque;                      
    dark.style.MozOpacity=opaque;                   
    dark.style.filter='alpha(opacity='+opacity+')'; 
    dark.style.zIndex=zindex;        
    dark.style.backgroundColor=bgcolor;  
    dark.style.width= pageWidth;
    dark.style.height= pageHeight;
    dark.style.display = 'block';    
  } else {
     dark.style.display='none';
     var selects = document.getElementsByTagName("select"); 
     for (i = 0; i != selects.length; i++) 
        { 
            selects[i].style.visibility = "visible"; 
        } 
  }
}

function showVGPSearchPopUp(e) {
            
    var posx = 0;
    var posy = 0;

    var scrolly = (document.documentElement) ? document.documentElement.scrollTop : window.pageYOffset
    var scrollx = (document.documentElement) ? document.documentElement.scrollLeft : window.pageXOffset

    var myWidth = 0, myHeight = 0;

    if (typeof (window.innerWidth) == 'number') {
        //Non-IE
        myWidth = window.innerWidth;
        myHeight = window.innerHeight;
    } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
        //IE 6+ in 'standards compliant mode'
        myWidth = document.documentElement.clientWidth;
        myHeight = document.documentElement.clientHeight;
    } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
    }

    posy = scrolly + ((myHeight - 508) / 2);
    posx = scrollx + ((myWidth - 440) / 2);

    popUpLayer = document.getElementById('vgpSearchHover');
        
    popUpLayer.style.top = posy + 'px';
    popUpLayer.style.left = posx + 'px';
    popUpLayer.style.display = 'block';
    popUpLayer.style.position = 'absolute';    
    
    popUpLayer.style.zIndex = 200000;

    grayOut(true);
    document.getElementsByTagName("body")[0].appendChild(popUpLayer);
}

function hideVGPSearchPopUp() {
    var popUpLayer = document.getElementById('vgpSearchHover');
    popUpLayer.style.display = 'none';
    grayOut(false);
}