function valid2()
{
	if(document.form2.fname.value=="")
	{
		alert("Insert first name");
		document.form2.fname.focus();
		return false;
	}
	if(document.form2.lname.value=="")
	{
		alert("Insert last name");
		document.form2.lname.focus();
		return false;
	}
	if(!validMail(document.form2.email.value))
	{
		alert("Insert Email");
		document.form2.email.focus();
		return false;
	}	
	document.form2.submit();
	return true;
}

function validf()
{
	if(document.form1.q.value=="")
	{
		alert("Insert word");
		document.form1.q.focus();
		return false;
	}
	document.form1.submit();
	return true;
}

function validf_()
{
	if(document.form10.q.value=="")
	{
		alert("Insert word");
		document.form10.q.focus();
		return false;
	}
	document.form10.submit();
	return true;
}

function checkEnter()
{
	if(window.event.keyCode==13) validf();
	
} 

function verification(){window.open("cvv.htm",null,"width=800,height=500,scrollbars=1");}

function t(){window.open("t.asp",null,"width=750, height=550, scrollbars=0");}
function getcode()
{
	document.getElementById("code").select();
	//document.execCommand("Copy");
	//window.clipboardData.getData("Text");
}

function cont()
{
	if(document.form4.fname.value=="")
	{
		alert("Insert first name");
		document.form4.fname.focus();
		return false;
	}
	if(document.form4.lname.value=="")
	{
		alert("Insert last name");
		document.form4.lname.focus();
		return false;
	}
	if(document.form4.country.value=="0")
	{
		alert("Select country");
		document.form4.country.focus();
		return false;
	}
	if(document.form4.www.value=="")
	{
		alert("Insert address");
		document.form4.www.focus();
		return false;
	}
	if(!validMail(document.form4.email.value))
	{
		alert("Insert valid email address");
		document.form4.email.select();
		return false;
	}
	if(document.form4.pass.value=="")
	{
		alert("Insert password");
		document.form4.pass.focus();
		return false;
	}
	if(!document.getElementById("terms").checked)
	{
		alert("Please accept the Terms of Service and the Privacy Policy");
		return false;
	}
	
	document.form4.submit();
	return true;
}




function validContact()
{
	if(document.contact.fname.value=="")
	{
	alert("Insert first name");
	document.contact.fname.focus();
	return false;
	}
	if(document.contact.lname.value=="")
	{
	alert("Insert last name");
	document.contact.lname.focus();
	return false;
	}
	
	if(document.contact.email.value=="")
	{
	alert("Insert email");
	document.contact.email.focus();
	return false;
	}	
	
	if(document.contact.note.value=="")
	{
	alert("Insert note");
	document.contact.note.focus();
	return false;
	}
	document.contact.submit();
	return true;
}


function translate(word, flang, tlang, datenow)
{
	if(word!="" && flang!="" && tlang!="")
	{
	var cUrl = "http://ol.goldword.com/ol/bot_net.asp?q=" + window.encodeURIComponent(word) + "&flang=" + flang + "&tlang=" + tlang + "&c=5&t=" + datenow;
	document.getElementById("frame").src=cUrl;
	}
}

function cbochange(id){document.getElementById("tto").src="cbo_3.asp?id=" + id;}
function sendorder()
{
	f = document.getElementById("ff").value;
	t = document.frames("tto").document.getElementById("to").value;
	if(t=="")
	{
		alert("Please select your destination language");
		return false;
	}
	window.location.href="ord.asp?f=" + f + "&t=" + t;
}





function validMail(strEmail) //if valid mail - return true
{
	var r, re;
	var email = new String(strEmail);
	re = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/ig;
	if(email.search(re)==0) 
		return true;
	else
		return false;	
}

function validOrder()
{
	if(document.form3.cardnum.value=="")
	{
		alert("Insert Credit Card Number");
		document.form3.cardnum.focus();
		return false;
	}
	if(document.form3.backnum.value=="")
	{
		alert("Insert Security Code");
		document.form3.backnum.focus();
		return false;
	}
	if(document.form3.cardname.value=="")
	{
		alert("Insert Cardholder's Name");
		document.form3.cardname.focus();
		return false;
	}
	if(document.form3.fname.value=="")
	{
		alert("Insert First Name");
		document.form3.fname.focus();
		return false;
	}
	if(document.form3.lname.value=="")
	{
		alert("Insert Last Name");
		document.form3.lname.focus();
		return false;
	}
	if(document.form3.address.value=="")
	{
		alert("Insert Street Address");
		document.form3.address.focus();
		return false;
	}
	if(document.form3.city.value=="")
	{
		alert("Insert City");
		document.form3.city.focus();
		return false;
	}
	if(document.form3.country.value=="0")
	{
		alert("Select Country");
		document.form3.country.focus();
		return false;
	}
	if(document.form3.zip.value=="")
	{
		alert("Insert Zip/Postal Codey");
		document.form3.zip.focus();
		return false;
	}
	if(!validMail(document.form3.email.value))
	{
		alert("Insert Email");
		document.form3.email.focus();
		return false;
	}
	if(!validMail(document.form3.vemail.value))
	{
		alert("Insert Verify Email");
		document.form3.vemail.focus();
		return false;
	}
	if(document.form3.email.value!=document.form3.vemail.value)
	{
		alert("Please check email");
		document.form3.vemail.focus();
		return false;
	}
	if(!document.getElementById("terms").checked)
	{
		alert("Please accept the Terms of Service and the Privacy Policy");
		return false;
	}
	document.form3.submit();
	return true;
}