function chkemail()
{
	if(frmnews.txtnewsletter.value == "")
	{
		alert("Key-in your Email Id");
		return false;
	}
	else
	{
		var a = frmnews.txtnewsletter.value.indexOf("@")
		if (a == -1)
		{
		alert("Key-in a valid Email Id");
		return false;
		}
	}
}
function validate()
{
	if(frmlogin.emailid.value == "")
	{
		alert("Key-in your Email Id.");
		frmlogin.emailid.focus();
		return false;
	}
	if(frmlogin.password.value == "")
	{
		alert("Key-in your password");
		frmlogin.password.focus();
		return false;
	}
}
function gosearch()
{
	if(frmsearch.txtsearch.value == "")
	{
		alert("Please insert proper keywords.");
		return false;
	}
}
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/1.07 : 0;
TopPosition = (screen.height) ? (screen.height-h)/5 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
function gosearch()
{
	document.location = "search.asp?search=" + window.txtsearch.value
}

////////////////////////////////////////////

function validatefrm()
{
	if(document.forms[0].sltfrom.value=="from")
		{
		alert("Please select Age From.");
		document.forms[0].sltfrom.focus();
		return false;
		}
	if(document.forms[0].sltto.value=="to")
		{
		alert("Please select Age To.");
		document.forms[0].sltto.focus();
		return false;
		}


	document.forms[0].action = "model_search.asp?model=" + document.forms[0].selmod.value + "&from=" + document.forms[0].sltfrom.value + "&to=" + document.forms[0].sltto.value;

}
