// JavaScript Document
	function show_menu(id){
		document.getElementById('detailes_' + id).className = 'show';
		document.getElementById('anunt_' + id).className = 'show';
		document.getElementById('down_' + id).style.display = 'none';
		document.getElementById('up_' + id).style.display = '';
	}
	function hide_menu(id){
		document.getElementById('detailes_' + id).className = 'hide_sub';
		document.getElementById('anunt_' + id).className = 'hide';
		document.getElementById('down_' + id).style.display = '';
		document.getElementById('up_' + id).style.display = 'none';
	}


	function show_menu_a(id){
		document.getElementById('detailes_' + id).className = 'show';
		document.getElementById('anunt_' + id).className = 'show';
		document.getElementById('down_' + id).style.display = 'none';
		document.getElementById('up_' + id).style.display = '';
		document.getElementById('a_down_' + id).style.display = 'none';
		document.getElementById('a_up_' + id).style.display = '';
		
	}
	function hide_menu_a(id){
		document.getElementById('detailes_' + id).className = 'hide_sub';
		document.getElementById('anunt_' + id).className = 'hide';
		document.getElementById('down_' + id).style.display = '';
		document.getElementById('up_' + id).style.display = 'none';
		document.getElementById('a_down_' + id).style.display = '';
		document.getElementById('a_up_' + id).style.display = 'none';
		
	}

function formSubmit(element)
	{
	document.forms[element].submit();
	}

// Ajax

var url = document.location.href;
	var xend = url.lastIndexOf("/") + 1;
	var base_url = url.substring(0, xend);
	
	function ajax_do (url) {
			// Does URL begin with http?
			if (url.substring(0, 4) != 'http') {
					url = base_url + url;
			}
	
			// Create new JS element
			var jsel = document.createElement('SCRIPT');
			jsel.type = 'text/javascript';
			jsel.src = url;
	
			// Append JS element (therefore executing the 'AJAX' call)
			document.body.appendChild (jsel);
	}

	function showBigPic(url)
	{
		document.getElementById('bigPic').style.background='url('+ url +') no-repeat center';
	}

 

 function openWin(link, handler, width, height) {
    window.open(link, handler, 'scrollbars=0, status=yes, location=no, width='+width+', height='+height+', ScreenX=100, ScreenY=50');
	}
	
// submit pe enter

	function enterSubmit(evt, f)
	{
		evt = (evt) ? evt : ((window.event) ? window.event : "")
		if(evt && evt.keyCode == 13)
		{
			evt.keyCode = null;
			var form = document.forms[f];
			if(form)
				form.submit();
		}
		
	}
	
  function chat(id) {
	    window.open('chat.php?id=' + id, 'chat' + id , 'resizable=0 , scrollbars=0, status=0, location=no, width=690, height=450');
  }	

	function radio(address) {
		var str  = '<OBJECT ID="WMPlay" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width=320 height=312 codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" type="application/x-oleobject">';
			str += '<param name="url" value="'+ address +'" />';
       	 	str += '  <PARAM name="DisplaySize" value="0" />';
        	str += '  <PARAM NAME="ShowControls" VALUE="1" />';
        	str += '  <PARAM NAME="ShowDisplay" VALUE="0" />';
        	str += '  <PARAM NAME="ShowStatusBar" VALUE="1" />';
        	str += '  <PARAM NAME="AutoStart" VALUE="TRUE" />';
        	str += '  <PARAM NAME="InvokeURLS" Value="False" />';
        	str += '  <PARAM NAME="WindowlessVideo" Value="TRUE" />';
			str += '<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/" width="320" height="312" src="'+address+'" name="4-fun.ro" AutoStart="True" showcontrols="1" ShowStatusBar="1" ShowDisplay="0"></embed>';
			str += '</object>'
		document.write(str);
	}
