function submitForm () 
{
	var aut, epasts, komentars, flag = true, message;
	//epasts = /([0-9a-zA-Z\.-_]+)@([0-9a-zA-Z\.-_]+)/;
	aut=document.frm.username.value;
	tek=document.frm.txt.value;
	if(aut.length == 0) {
		flag = false;
		message = "Enter your name"; }
	else {
			if(tek.length == 0) {
				flag = false;
				message = "Enter text"; }
			}
	if (!flag) 
	{
		window.alert(message);
	}
	return flag;
}

function openWin(https,wid,hei,name){
shopWin = open(https, name, "scrollbars=no,resizable=no,width="+wid+",height="+hei+"");
		shopWin.focus();
}

function submitLocations()
{
	var fr=document.forms["form_1"];
	fr.show_places.value = 1;
	document.forms['form_1'].submit();
}

function AddRequestCompany(id, objval){
	try
  {
	  xmlHttp=new XMLHttpRequest();  // Firefox, Opera 8.0+, Safari
	}
	catch (e) // Internet Explorer
  {
		try
    {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
      {
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				alert("Your browser does not support AJAX!");
				return false;
			};
		};
	};
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4) alert(xmlHttp.responseText);
	};
	xmlHttp.open("GET","quote_request.php?id=" + id + "&m=" + (objval.checked==false ? "del" : "add"), true);
	xmlHttp.send(null);
}

function ReturnQuoteRequestCheck(){
	borga = true;
	if (document.getElementById("name").value=="")
	{
		document.getElementById("name").focus();
		borga = false;
	}
	if (document.getElementById("phone").value=="")
	{
		document.getElementById("phone").focus();
		borga = false;
	}
	if (document.getElementById("email").value=="")
	{
		document.getElementById("email").focus();
		borga = false;
	}
	return borga;
}
