
function WindowPopup(sURL, sName, sFeatures) {
 var siFeatures = 'menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,dependent=yes,hotkeys=no,top=10,left=10';
 var siName = 'PopUp';

 if (sFeatures.length > 0) {siFeatures = siFeatures + ',' + sFeatures};
 PopUpWindow = window.open('', sName, siFeatures);
 if (PopUpWindow != null) {
   if (PopUpWindow.opener == null) {
     PopUpWindow.opener = self;
   }
   PopUpWindow.location.href = sURL;
 }
}

function SetClientCookie()
{
    document.cookie = "popup=HasClicked;path=/";
    document.getElementById('regArea').style.display='none'
}
   
function SetCookie()
{
    document.cookie = "popup=HasClicked;path=/";
    document.getElementById('regArea').style.display='none'
}

function Get_cookie ( cookie_name )
{
    var results = document.cookie.match ( cookie_name + '=(.*?)(;|$)' );
    if ( results )
      return ( unescape ( results[1] ) );
    else
      return null;
}

function CheckUrl( 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];
}

function displayinfo(e) {
    var d = e.style.display;
    e.style.display = (d == 'none' || d == '') ? '' : 'none';
}

function hideinfo(e) {
    e.style.display = 'none';
}