var globarCookieDomain = "bookingvegas.com";
function chkForm(){
	var txt = document.getElementById("q");
	var txtValue = txt.value ;
	if (txtValue == "")
	{
		return false;
	}else{
		return true;
	}
}

	$("q").observe("focus", function(evt){
		this.addClassName("focus");
	}.bindAsEventListener($("q")));

	$("q").observe("blur", function(evt){
		if (!this.value) this.removeClassName("focus");
	}.bindAsEventListener($("q")));

function qfocus(){
	var q = document.getElementById("q");
	if (q.value == "Search News"){
		q.value = "";
	}
}

function qblur(){
	var q = document.getElementById("q");
	if (q.value == ""){
		q.value = "Search News";
	}
}

var dealsLoad = false;
function dealsChange(v){
	if (dealsLoad == true){
		return false;
	}
	dealsLoad = true;
	$("listDiv").update('<img src="/img/index/loading.gif" alt="Loading" />');
	new Ajax.Request('/deals/load_deals.html',{
		parameters:{
			category:v
		},
		onSuccess:function(res){
			$("deals").update(res.responseText);
			dealsLoad = false;
		}
	}) ;
}

function loadDeals(){
	$("deals").update('<img src="/img/index/loading.gif" alt="Loading" />');
	new Ajax.Request('/deals/load_deals.html',{
		parameters:{
			category:""
		},
		onSuccess:function(res){
			$("deals").update(res.responseText);
		}
	}) ;
}

function load_super(){
	new Ajax.Request('/tickets/load_super.html',{
		onSuccess:function(res){
			$("super_description").update(res.responseText);
		}
	}) ;
}

function fullOpen(_u,_name){
	var myWin = window.open(_u,_name,"toolbar=1,location=1,status=1,menubar=1,scrollbars=1,resizable=1,top=0,left=0,width=" + screen.availWidth + ",height=" + screen.availWidth + "");
	myWin.focus();
}

function urlReplace(qValue){
	var filterValue ;
	var regexp = /[\`\~\!\@\#\$\%\^\&\*\(\)\_\+\|\-\=\\\{\}\[\]\;\'\:\"\,\.\/\<\>\?]+/gi ;
	filterValue = qValue.replace(regexp," ");
	var regexp = /\s/gi ;
	filterValue	= filterValue.replace(regexp, "_")
	var regexp = /\_{2,}/gi ;
	filterValue	= filterValue.replace(regexp, "_")
	return filterValue;
}