function GetSearchResults()
{
    if(document.getElementById("Search_box").value != "")
    {
        var SearchText = document.getElementById("Search_box").value;
        
        //values for makino.com
        //var cx = "016290299162511961080:9ktia3du6kg";
        
        //values for hobart consultants
        var cx = "014470239484978518068:-go4x75wtaw";

        var cof = "FORID:11";
        window.location = "/Consultants/SearchResults.aspx?q=" + SearchText + "&cx=" + cx + "&cof=" + cof;
    }
}

function checkEnter(e){ //e is event object passed from function invocation
var characterCode;

if(e && e.which){ //if which property of event object is supported (NN4)
e = e
characterCode = e.which //character code is contained in NN4's which property
}
else{
e = event
characterCode = e.keyCode //character code is contained in IE's keyCode property
}

if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
alert("ss");

self.location = "http://www.google.com";
    window.location = "www.google.com";
return false
}
else{
return true
}

}
function checkSearchTest()
{
    GetSearchResults();
    return false;
}


$().ready(function(){
	$("a.popup").each(function(){
		var href = $(this).attr("href");
		$(this).attr("href", "javascript:void(0);");
		
		$(this).click(function(){
			window.open(href,'mywindow','height=600,width=720,scrollbars=1');
		});
	});
});


function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1; 
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    } 
  }
return "";
}