

  function reloadCaptcha(imageName)
  {
    var randomnumber=Math.floor(Math.random()*1001); // generate a random number to add to image url to prevent caching
    document.images[imageName].src = document.images[imageName].src + '&amp;rand=' + randomnumber; // change image src to the same url but with the random number on the end
  }


function valid()
{
if((document.frm.CategoryId.value=="")||(document.frm.Name.value=="")||(document.frm.Address.value=="")||(document.frm.City.value=="")||(document.frm.Username.value=="")||(document.frm.Password.value=="")||(document.frm.rpassword.value=="")||(document.frm.captchacode.value==""))
{
alert("Please enter the Compulsary Fields");
return false;
}
}
function checkemail(x) 
{
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(x))
		{
		return true;
		}
	else
		{
		return false;
		}
}

function sendm()
{ 
var name = document.frm.Name.value;
var CategoryId = document.frm.CategoryId.value;
var Address = document.frm.Address.value;
var City = document.frm.City.value;
var Phone = document.frm.Phone.value;
var Mobile = document.frm.Mobile.value;
var Website = document.frm.Website.value;
var Email = document.frm.Email.value;
var Password = document.frm.Password.value;
var rpassword = document.frm.rpassword.value;
 var captchacode = document.frm.captchacode.value;
				  

if(namee=="")
{
alert("Please fill the Name");
//if(checkemail(email)==false)
//{
//alert("Invalid Email Address");
//document.frm.email.focus();
//}
}
else
{

xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
     {
alert ("Browser does not support HTTP Request");
return
     } 
     
     

//var str="name="+name+"&country="+country+"&phone="+phone+"&email="+email+"&msg="+msg;
var str = 'namee='+ namee + '&dob=' + dob + '&nationality=' + nationality + '&languages=' + languages + '&height=' + height + '&weight=' + weight + '&bust=' + bust + '&shoulders=' + shoulders + '&hips=' + hips + '&eyes=' + eye + '&hair=' + hair + '&complexion=' + complexion + '&experience=' + experience + '&phone=' + phone;

var url="process.asp?" + str + "&m"+ Math.random();
xmlHttp.onreadystatechange=stateChanged ;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
return false;

}
function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
//alert(xmlHttp.responseText);
document.getElementById("formContainer").innerHTML='Thanks for the Enquiry! We Will contact you soon' ;
} 
else
{
///uest_book.style["visibility"]="visible";
document.getElementById("formContainer").innerHTML='Sending<br><img src="loader.gif">' ;
}
} 

function GetXmlHttpObject()
{ 
var objXMLHttp=null;
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest();
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
return objXMLHttp;
}


}
           

