<!-- RESOLUTION HACKS ---!>
//writeCookie();

function writeCookie() 
{
 var today = new Date();
 var the_date = new Date("December 31, 2023");
 var the_cookie_date = the_date.toGMTString();
 var ie6 = detectBrowser();
 var the_cookie = "users_resolution="+ screen.height;  //screen.width +"x"+ screen.height
 var the_cookie = the_cookie + ";expires=" + the_cookie_date;
 document.cookie=the_cookie;
 the_cookie = "ie6browser=" + ie6;
 document.cookie=the_cookie;
}

function detectBrowser()
{
var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=parseFloat(b_version);
if ((browser=="Microsoft Internet Explorer") && (version>=4))
{
return 1;
}else{
return 0;
}
}

/*---- SWITCH BOX FUNCTIONS ----- */
/*--selected = "city";--*/

function switchBox(btn,parent,num) {
	if(btn != selected) {
		document.getElementById(parent).style.background = "url(images/" + parent + num + ".gif)";
		document.getElementById("switch_" + selected).innerHTML = "<img src='images/" + selected + "_btn_off.gif' border='0' />";
		document.getElementById("switch_" + btn).innerHTML = "<img src='images/" + btn + "_btn_on.gif' border='0' />";
		document.getElementById(selected + "_content").style.display = "none";
		document.getElementById(btn + "_content").style.display = "block";		
		selected = btn;
	}
}
//-->

/*-----TOOLTIP FUNCTIONS ------ */
/*
 * Tooltip script 
 * powered by jQuery (http://www.jquery.com)
 * 
 * written by Alen Grakalic (http://cssglobe.com)
 * 
 * for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
 *
 */

this.tooltip = function(){	
	/* CONFIG */		
		xOffset = 10;
		yOffset = 20;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$("a.tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$("body").append("<p id='tooltip'>"+ this.t +"</p>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$("a.tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};


/*---------- SUGGESTIONS ---------- */


// starting the script on page load
$(document).ready(function(){
	tooltip();
});


	function lookup(BizIndustry) {

		if(BizIndustry.length == 0) {
			// Hide the suggestion box.
			$('#extendable').slideUp('normal');
		} else {
			$.post("includes/boxes/suggestions_industries_box.php", {queryString: ""+BizIndustry+""}, function(data){
				if(data.length >0) {
					$('#extendable').slideDown('normal');
					$('#autoSuggestionsList').html(data);
				}
			});
		}
	} // lookup
	
	function fill(thisValue) {
		$('#a').val(thisValue);
		setTimeout("$('#extendable').slideUp('normal');", 200);
	}
