function selectAll(id){
	var text_val = document.getElementById(id);
	text_val.focus();
	//text_val.select();
}

function locationForum(page_link){
	alert(sel);
	//var link_val = sel.options[sel.selectedIndex].value;
	alert(sel);
	window.location = page_link;
}

function locationGoForum(){
	var sel = document.getElementById('help-desk-select').index;
	var link_val = sel.options[sel.selectedIndex].value;
	alert(link_val);
	window.location = link_val;
}

function openPage(url,page_width,page_height){
	window.open(url,"_blank","width="+page_width+",height="+page_height+",scrollbars=1,resizable=1");
}

function checkForm(){
	
	if (document.contact_form.name.value==""){
		alert("Add name !");
		document.contact_form.name.focus();
		return false;
	}	
	if (document.contact_form.email.value==""){
		alert("Add email !");
		document.contact_form.email.focus();
		return false;
	  }
	else {
   	   var str=document.contact_form.email.value
       var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
       if (!filter.test(str)){
		 alert("Invalid email !");
		 document.contact_form.email.focus();
		 return false;
	    }	  	
	  }
 
	 if (document.contact_form..value=="") {
		alert("Add message !");
		document.contact_form.mesaj.focus();
		return false;
	  }  
	document.contact_form.submit();
	return true;
}

function checkRes(){
	if ( navigator.appName == 'Microsoft Internet Explorer' ){
  document.getElementById('body-top-background').style.overflowX = 'hidden';
  if (document.body.clientWidth < 980){
   document.getElementById('body-top-background').style.overflowX  = '';
  }
	}
	else {
  document.body.style.overflowX = 'hidden';
  if (document.body.clientWidth < 980){
   document.body.style.overflowX = '';
  }
	}
}

function toggleVisibility(id){
	if (document.getElementById(id).style.display == ""){
		show = "none";
	}
	else{
		show = "";
		}
	document.getElementById(id).style.display = show;
}

