function SymError()
{
  return true;
}

//window.onerror = SymError;

function validate(form)
{
var name=alltrim(form.Name.value);
	if(name==""||!isNaN(name))
	{
		alert("Please enter Name");
		form.Name.focus();
		return false;
	}
var phone=alltrim(form.Phone_Mobile.value);
//alert(phone);
	if(phone=="")
	{
		alert("Please enter Phone / Mobile");
		form.Phone_Mobile.focus();
		return false;
	}
var email=alltrim(form.Email.value);
	if(email=="" ||email.indexOf('@')==-1||email.indexOf('.')==-1)
	{
		alert("Please enter valid Email");
		form.Email.focus();
		return false;
	}

return true;
}

function ltrim(ObjectValue)
{
ctr=0
for(i=0; i < ObjectValue.length;i++)
{
  if(ObjectValue.charAt(i) == " ")
    ctr = ctr + 1 
    else
    break
}
return ObjectValue.substr(ctr,ObjectValue.length)
} // end of function ltrim

function rtrim(ObjectValue)
{
ctr=0
for(i=ObjectValue.length -1; i >=0 ;i--)
{
  if(ObjectValue.charAt(i) == " ")
    ctr = ctr + 1 
    else
    break
}
return ObjectValue.substr(0,ObjectValue.length-ctr)
} // end of function rtrim


function alltrim(ObjectValue)
{
 return rtrim(ltrim(ObjectValue))
} // end of function alltrim
//****End Of Code For Removing The Spaces****


function imageopen(iname,w,h)
{
var myBars='directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no,scrollbars=no, width=' + w + ', height=' + h + ', resizable=no, left=' + (screen.width-w)/2 + ', top=' + (screen.height-h)/2 ;
var newWin=open('','hc',myBars);
newWin.document.writeln("<html><head><title>Hotel M. C. International, Amritsar</title></head>");
newWin.document.writeln("<body bgcolor='#FFFFFF' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>");
newWin.document.writeln("<table width='100%' cellpadding=0 cellspacing=0><tr align=center><td valign=middle><img src='images/" + iname + "'></td></tr></table>");
newWin.document.writeln("</body></html>");
newWin.document.close();
newWin.focus();
}
