	function noSpam(user,domain)
	{
					 window.location = "mailto:" + user + "@" + domain;
	} 

	function refreshPage(main,params)
	{
			//url='main.php?mode='+mode;
			url=main;
			if (params!=undefined)
					url+=params;
			location.replace(url);
	}	
	
	function category_changeDisplay(id,mainimages) {
		var element = document.getElementById(id);
		var display_block_value = 'block';
		var display_none_value = 'none';
		if (element != null) {
				if(element.style.display == display_block_value) {
						element.style.display = display_none_value;
						document.getElementById('main'+id).style.backgroundColor='#000000';
				} else {
						element.style.display = display_block_value;
						document.getElementById('main'+id).style.backgroundColor='#6B6B6B';
				}
		}
	}	
	
	function OpenWindow(theURL,width,height)
	{
			window.open(theURL,'','height='+height+',width='+width+',menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,right=0,bottom=0');
	}
	
	function settime(cnt) 
	{
			var tab=document.getElementById("selectedTab").value;
			tab++;
			if (tab>cnt) tab=1;
			
	//		alert(tab);
				
			for (var x = 0; x < cnt; x++)
			{
					var x_=x+1;
					document.getElementById("Tab"+x_).style.display="none";
					document.getElementById("Link"+x_).style.fontWeight="normal";
					document.getElementById("aLink"+x_).style.color="white";
					document.getElementById("Link"+x_).style.backgroundColor="#AB2629";					
			}				
			
			document.getElementById("Tab"+tab).style.display="block";
			document.getElementById("Link"+tab).style.fontWeight="bold";		
			document.getElementById("aLink"+tab).style.color="black";
			document.getElementById("Link"+tab).style.backgroundColor="#ffffff";					
			document.getElementById("selectedTab").value=tab;		
	}	


	function showTab(tab,cnt)
	{
			for (var x = 0; x < cnt; x++)
			{
					document.getElementById("Tab"+(x+1)).style.display="none";
					document.getElementById("Link"+(x+1)).style.fontWeight="normal";
					document.getElementById("aLink"+(x+1)).style.color="#ffffff";
					document.getElementById("Link"+(x+1)).style.backgroundColor="#AB2629";						
			}		
			document.getElementById("Tab"+tab).style.display="block";
			document.getElementById("Link"+tab).style.fontWeight="bold";
			document.getElementById("aLink"+tab).style.color="#000000";
			document.getElementById("Link"+tab).style.backgroundColor="#ffffff";								
			document.getElementById("selectedTab").value=tab;
}
	
