
	/**************cookie handling************************/

	
	//to clear default field value
	function clearText(thefield){
		if (thefield.defaultValue==thefield.value)
			thefield.value = ""
	} 
	
	function setBackText(thefield){
		if (thefield.value=="")
			thefield.value = thefield.defaultValue;
	} 




	function addToFavorites(url,title){
	  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
	  window.external.AddFavorite(url,title);
	  } else if (navigator.appName == "Netscape") {
		window.sidebar.addPanel(title,url,"");
	  } else {
		alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
	  }
	}
	
	function common() {	
	

		$("table.table_skinned tr:odd").addClass("rw"); 
		
		//$("table.table_skinned.vertical tr td:first-child").css({backgroundColor:'#ff0000'});
		$("table.table_skinned.vertical tr td:first-child").addClass("first"); 
		$("table.table_skinned.vertical tr th:first-child").addClass("first"); 
	
		//login module
		$("#nav_cont form input").livequery("focus",function(){
			clearText(this);							   
		});
		$("#nav_cont form input").livequery("blur",function(){
			setBackText(this);							   
		});		
	
		$("#nav_cont form input").livequery("keydown",function(e){
			if (e.keyCode==13)													 
				this.parentNode.submit();						   
		});


		$(".tabs li a").livequery("click",function(){
			$("li",this.parentNode.parentNode).removeClass("selected");												   
			$("li a",this.parentNode).removeClass("selected");
			
			$(this).parent().addClass("selected");			
			
			$(".tab",this.parentNode.parentNode.parentNode).removeClass("selected");
			$('.tab[rel="'+$(this).attr("rel")+'"]',this.parentNode.parentNode.parentNode).addClass("selected");			
			
			if($(this).attr("rel"))
				return false;
			
		});
	
		$(".gt_search_widget .id_search").livequery("click",function(){
			$(".gt_search_widget .search").removeClass("selected");												   												   
			
			$('.gt_search_widget .search[rel="'+this.value+'"]').addClass("selected");			
		});

	}

	$(document).livequery(common);