﻿
 function queryString( 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];	
} 

$(document).ready(function(){
	if(queryString("sson")=="true"){
		
			 $(".reg_options li").eq(1).hide();
			 $(".reg_options li.radio").hide();
	} 
		
	if(queryString("sson")!="true"){
		$(".reg_options li.radio").each(function(){						  
			  var str = jQuery.trim($(this).text());		
				if(str==""){
						 $(".reg_options li").eq(1).hide();
						 $(".reg_options li.radio").hide();
				}else{}			   		   
			});
		} 
});

if (top !== self) top.location.replace(self.location.href);

function GoToSearchPage(searchTerm)
{
    if (searchTerm.length > 0)
    {
        //window.location='redSearch.aspx?keyword=' + searchTerm;
        SideBar_RedirectUrl = 'redSearch.aspx?keyword=' + searchTerm;
        setTimeout("window.location.href = SideBar_RedirectUrl", 0);
        return false;
    }
    else
        return false;
}

function Search(event)
{
	if(!event) event = window.event;

	if(event.which || event.keyCode)
	{
		if ((event.which == 13) || (event.keyCode == 13))
		{
			document.getElementById('search_btn').click();
			return false;
		}
	}
	else 
	{
		return true;
	}
}   

function divReplace(oldDiv,replaceDiv) {
        var download_form = document.getElementById(oldDiv);
        
		if (download_form && document.getElementById(replaceDiv) != null)
		{
		    download_form.style.display="none";
		    document.getElementById(replaceDiv).innerHTML = download_form.innerHTML;
		    document.getElementById(replaceDiv).style.display = "block";
		    download_form.innerHTML = "";
		}
	} 
	
/***************** FLASH JAVASCRIPT IMAGE CLICKER  *****************/
/*
function sspToggleDisplayMode() {
    thisMovie("ssp").sspToggleDisplayMode(null);
}

function sspLoadAlbum(album) {
    thisMovie("ssp").sspLoadAlbum(album);
}

function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    } else {
        return document[movieName]
    }
}
*/
/***************** FLASH JAVASCRIPT IMAGE CLICKER  *****************/