/**************************************************************************************************
*           *       @       Created By              :       Sudeep Jain                           *
*           *       @       Modified By             :        Sudeep Jain                   		  *
*           *       @       Date Of Creation        :       05-01-2010                            *
*           *       @       Date Of Modification    :                    					      *
*           *       @       Project Name            :       Webindiabusiness                      *
**************************************************************************************************/

/************************************************************************************************** 
* Function to validate radio button, Start
**************************************************************************************************/
function checkRadio(btn) {
    var cnt = -1;
    for (var i=btn.length-1; i > -1; i--) {
        if (btn[i].checked) {cnt = i; i = -1;}
    }
    if (cnt > -1) return btn[cnt].value;
    else return null;
}
/************************************************************************************************** 
* Function to validate radio button, End 
**************************************************************************************************/  

/************************************************************************************************** 
* Function to change the admin password , Start 
**************************************************************************************************/
function changePasswordValidate(){
	var oldPassword = document.form.oldPassword.value;
	var newPassword = document.form.newPassword.value;
	var rePassword = document.form.rePassword.value;
	if(oldPassword==''){
		document.getElementById('changePasswordDiv').innerHTML = "Enter old password.";
		document.getElementById('changePasswordDiv').style.display="block";
		document.form.oldPassword.focus();
		return false;
	}
	if(newPassword==''){
		document.getElementById('changePasswordDiv').innerHTML = 'Enter new password.';
		document.getElementById('changePasswordDiv').style.display = 'block';
		document.form.newPassword.focus();
		return false;
	}
	if(rePassword==''){
		document.getElementById('changePasswordDiv').innerHTML = 'Enter Re-password.';
		document.getElementById('changePasswordDiv').style.display = 'block';
		document.form.rePassword.focus();
		return false;
	}
	if(newPassword!=rePassword){
		document.getElementById('changePasswordDiv').innerHTML = 'New password and Re-password did not match.';
		document.getElementById('changePasswordDiv').style.display = 'block';
		document.form.newPassword.focus();
		document.form.newPassword.value='';
		document.form.rePassword.value='';
		return false;
	}
	return true;
}
/************************************************************************************************** 
* Function to change the admin password , End
**************************************************************************************************/

/************************************************************************************************** 
* Function to validate category, Start 
**************************************************************************************************/
function validateCategory(){
	var catid = document.form.id.value;
	var category = document.form.category.value;
	tinyMCE.triggerSave();
	var longDesc = document.getElementById('longDesc').value;
	//var longDesc = tinyMCE.getInstanceById('longDesc').contentDocument.body.innerHTML;
	//var longDesc = document.form.longDesc.value;
	var image=document.getElementById('catImage').value;
	if(catid==''){
		document.getElementById('categoryDiv').innerHTML = "Enter category Code.";
		document.getElementById('categoryDiv').style.display="block";
		document.form.id.focus();
		return false;
	}
	if(category==''){
		document.getElementById('categoryDiv').innerHTML = "Enter category.";
		document.getElementById('categoryDiv').style.display="block";
		document.form.category.focus();
		return false;
	}
	if(longDesc==''){
		document.getElementById('categoryDiv').innerHTML = "Please enter description of Category.";
		document.getElementById('categoryDiv').style.display="block";
		document.form.longDesc.focus();
		return false;
	}
	if(image==''){
		document.getElementById('categoryDiv').innerHTML = "Please Browse Image.";
		document.getElementById('categoryDiv').style.display="block";
		document.form.catImage.focus();
		return false;
	}
	return true;
}
/************************************************************************************************** 
* Function to validate category, End
**************************************************************************************************/

/************************************************************************************************** 
* Function to validate Photo, Start 
**************************************************************************************************/
function validatePhoto(){
	var category = document.form.category.value;
	var subcategory = document.form.subcategory.value;
	var image=document.getElementById('Images').value;
	if(category==''){
		document.getElementById('photoDiv').innerHTML = "Select Category Name.";
		document.getElementById('photoDiv').style.display="block";
		document.form.category.focus();
		return false;
	}
	if(subcategory==''){
		document.getElementById('photoDiv').innerHTML = "Enter Subcategory.";
		document.getElementById('photoDiv').style.display="block";
		document.form.subcategory.focus();
		return false;
	}
	if(image==''){
		document.getElementById('photoDiv').innerHTML = "Please Browse Image.";
		document.getElementById('photoDiv').style.display="block";
		document.form.Images.focus();
		return false;
	}
	return true;
}
/************************************************************************************************** 
* Function to validate category, End
**************************************************************************************************/
/************************************************************************************************** 
* Function to validate category, Start 
**************************************************************************************************/
function updateCategory(){
	var catid = document.form.id.value;
	var category = document.form.category.value;
	tinyMCE.triggerSave();
	var longDesc = document.getElementById('longDesc').value;
	//var longDesc = tinyMCE.getInstanceById('longDesc').contentDocument.body.innerHTML;
	//var longDesc = document.form.longDesc.value;
	if(catid==''){
		document.getElementById('categoryDiv').innerHTML = "Enter category Code.";
		document.getElementById('categoryDiv').style.display="block";
		document.form.id.focus();
		return false;
	}
	if(category==''){
		document.getElementById('categoryDiv').innerHTML = "Enter category.";
		document.getElementById('categoryDiv').style.display="block";
		document.form.category.focus();
		return false;
	}
	if(longDesc==''){
		document.getElementById('categoryDiv').innerHTML = "Please enter description of Category.";
		document.getElementById('categoryDiv').style.display="block";
		document.form.longDesc.focus();
		return false;
	}
	return true;
}
/************************************************************************************************** 
* Function to validate category, End
**************************************************************************************************/

/************************************************************************************************** 
* Function to validate subcategory, Start 
**************************************************************************************************/
function validateSubCategory(){
	
	var cat_ID = document.form.category.value;
	var subcatID = document.form.id.value;
	var subcategory = document.form.subcategory.value;
	tinyMCE.triggerSave();
	var longDesc = document.getElementById('longDesc').value;
	//var longDesc = tinyMCE.getInstanceById('longDesc').contentDocument.body.innerHTML;
	//var longDesc = document.form.longDesc.value;
	var duration = document.form.duration.value;
	var destination = document.form.destination.value;
	if(cat_ID==''){
		document.getElementById('subCategoryDiv').innerHTML = "Select category .";
		document.getElementById('subCategoryDiv').style.display="block";
		document.form.category.focus();
		return false;
	}
	if(subcatID==''){
		document.getElementById('subCategoryDiv').innerHTML = "Enter Subcategory Code.";
		document.getElementById('subCategoryDiv').style.display="block";
		document.form.id.focus();
		return false;
	}
	if(subcategory==''){
		document.getElementById('subCategoryDiv').innerHTML = "Enter Subcategory .";
		document.getElementById('subCategoryDiv').style.display="block";
		document.form.subcategory.focus();
		return false;
	}
	if(longDesc==''){
		document.getElementById('subCategoryDiv').innerHTML = "Please enter description of Sub-Category.";
		document.getElementById('subCategoryDiv').style.display="block";
		document.form.longDesc.focus();
		return false;
	}
	if(duration==''){
		document.getElementById('subCategoryDiv').innerHTML = "Please Enter Duration.";
		document.getElementById('subCategoryDiv').style.display="block";
		document.form.duration.focus();
		return false;
	}
	if(destination==''){
		document.getElementById('subCategoryDiv').innerHTML = "Please Enter Destination.";
		document.getElementById('subCategoryDiv').style.display="block";
		document.form.destination.focus();
		return false;
	}
	return true;
}
/************************************************************************************************** 
* Function to validate subcategory, End
**************************************************************************************************/
/************************************************************************************************** 
* Function to validate subcategory, Start 
**************************************************************************************************/
//function validateSub-Category(){
//	
//	var cat_ID = document.form.category.value;
//	var subcatID = document.form.id.value;
//	var subcategory = document.form.subcategory.value;
//	tinyMCE.triggerSave();
//	var longDesc = document.getElementById('longDesc').value;
//	//var longDesc = tinyMCE.getInstanceById('longDesc').contentDocument.body.innerHTML;
//	//var longDesc = document.form.longDesc.value;
//	if(cat_ID==''){
//		document.getElementById('subCategoryDiv').innerHTML = "Select category .";
//		document.getElementById('subCategoryDiv').style.display="block";
//		document.form.category.focus();
//		return false;
//	}
//	if(subcatID==''){
//		document.getElementById('subCategoryDiv').innerHTML = "Enter Subcategory Code.";
//		document.getElementById('subCategoryDiv').style.display="block";
//		document.form.id.focus();
//		return false;
//	}
//	if(subcategory==''){
//		document.getElementById('subCategoryDiv').innerHTML = "Enter Subcategory .";
//		document.getElementById('subCategoryDiv').style.display="block";
//		document.form.subcategory.focus();
//		return false;
//	}
//	if(longDesc==''){
//		document.getElementById('subCategoryDiv').innerHTML = "Please enter description of Sub-Category.";
//		document.getElementById('subCategoryDiv').style.display="block";
//		document.form.longDesc.focus();
//		return false;
//	}
//	
//	return true;
//}
/************************************************************************************************** 
* Function to validate subcategory, End
**************************************************************************************************/

/************************************************************************************************** 
* Function to validate Product, Start 
**************************************************************************************************/
function validateProduct(){
	var radio_choice = false;
	for (counter = 0; counter < document.form.type.length; counter++){
		if (document.form.type[counter].checked)
			radio_choice = true; 
	}
	if (!radio_choice){
		document.getElementById('productDiv').innerHTML = "Select Nature of Business.";
		document.getElementById('productDiv').style.display="block";
		/*document.form.type.focus();*/
		return (false);
	}
	var productid = document.form.productid.value;
	if(productid==''){
		document.getElementById('productDiv').innerHTML = "Select Product Id.";
		document.getElementById('productDiv').style.display="block";
		document.form.productid.focus();
		return false;
	}
	var product = document.form.product.value;
	if(product==''){
		document.getElementById('productDiv').innerHTML = "Enter product.";
		document.getElementById('productDiv').style.display="block";
		document.form.product.focus();
		return false;
	}
	return true;
}
/************************************************************************************************** 
* Function to validate Product, End
**************************************************************************************************/
/************************************************************************************************** 
* Function to validate Sub-Product, Start 
**************************************************************************************************/
function validatesubProduct(){
	var radio_choice = false;
	for (counter = 0; counter < document.form.type.length; counter++){
		if (document.form.type[counter].checked)
			radio_choice = true; 
	}
	if (!radio_choice){
		document.getElementById('productDiv').innerHTML = "Select Nature of Business.";
		document.getElementById('productDiv').style.display="block";
		/*document.form.type.focus();*/
		return (false);
	}
	var product_ID = document.form.product_ID.value;
	if(product_ID==''){
		document.getElementById('productDiv').innerHTML = "Select Product.";
		document.getElementById('productDiv').style.display="block";
		document.form.product_ID.focus();
		return false;
	}
	var subproductID = document.form.subproductID.value;
	if(subproductID==''){
		document.getElementById('productDiv').innerHTML = "Enter Subproduct code.";
		document.getElementById('productDiv').style.display="block";
		document.form.subproductID.focus();
		return false;
	}
	var subproduct = document.form.subproduct.value;
	if(subproduct==''){
		document.getElementById('productDiv').innerHTML = "Enter Subproduct.";
		document.getElementById('productDiv').style.display="block";
		document.form.subproduct.focus();
		return false;
	}
	return true;
}
/************************************************************************************************** 
* Function to validate Sub-Product, End
**************************************************************************************************/

/************************************************************************************************** 
* Function to validate member login, Start 
**************************************************************************************************/
function validateMemberLogin(){
	var emailExp = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	var email = document.loginForm.email.value;
	var password = document.loginForm.password.value;	
	if(email==''){
		document.getElementById('memberLoginDiv').innerHTML = "Enter user Id.";
		document.getElementById('memberLoginDiv').style.display="block";
		document.loginForm.email.focus();
		return false;
	}
	if(!email.match(emailExp)){
		document.getElementById('memberLoginDiv').innerHTML = "Enter valid email.";
		document.getElementById('memberLoginDiv').style.display="block";
		document.loginForm.email.focus();
		return false;
	}
	if(password==''){
		document.getElementById('memberLoginDiv').innerHTML = "Enter password.";
		document.getElementById('memberLoginDiv').style.display="block";
		document.loginForm.password.focus();
		return false;
	}
	return true;
}
/************************************************************************************************** 
* Function to validate member login, End 
**************************************************************************************************/

/************************************************************************************************** 
* Function to limit text, Start 
**************************************************************************************************/
function limitText(limitField, limitCount, limitNum) {
	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0, limitNum);
	} else {
		limitCount.value = limitNum - limitField.value.length;
	}
}
/************************************************************************************************** 
* Function to limit text, End
**************************************************************************************************/

/************************************************************************************************** 
* Function to validate buy sell, Start 
**************************************************************************************************/
function validateCity(){
	var city = document.form.city.value;
	
	if(city==''){
		document.getElementById('cityDiv').innerHTML = "Enter City Name.";
		document.getElementById('cityDiv').style.display="block";
		document.form.city.focus();
		return false;
	}
	
	return true;
}
/************************************************************************************************** 
* Function to validate buy sell, End 
**************************************************************************************************/ 

/************************************************************************************************** 
* Function to validate service provider, Start 
**************************************************************************************************/
function validatePackage(){
	var category = document.form.category.value;
	var subcategory = document.form.subcategory.value;
	tinyMCE.triggerSave();
	var longDesc = document.getElementById('longDesc').value;
	//var longDesc = tinyMCE.getInstanceById('longDesc').contentDocument.body.innerHTML;
	//var longDesc = document.form.longDesc.value;
	if(category==''){
		document.getElementById('packageDiv').innerHTML = "Select Category Name.";
		document.getElementById('packageDiv').style.display="block";
		document.form.category.focus();
		return false;
	}
	if(subcategory==''){
		document.getElementById('packageDiv').innerHTML = "Select Sub-Category Name.";
		document.getElementById('packageDiv').style.display="block";
		document.form.subcategory.focus();
		return false;
	}
	if(longDesc==''){
		document.getElementById('packageDiv').innerHTML = "Enter Description of Package.";
		document.getElementById('packageDiv').style.display="block";
		document.form.longDesc.focus();
		return false;
	}
	return true;
}
/************************************************************************************************** 
* Function to validate service provider, End
**************************************************************************************************/
/************************************************************************************************** 
* Function to validate service provider, Start 
**************************************************************************************************/
function validateHotels(){
	var category = document.form.category.value;
	var subcategory = document.form.subcategory.value;
	var city = document.form.city.value;
	var hotel = document.form.hotel.value;
	var categoryhotel = document.form.categoryhotel.value;
	if(category==''){
		document.getElementById('hotelsDiv').innerHTML = "Select Category Name.";
		document.getElementById('hotelsDiv').style.display="block";
		document.form.category.focus();
		return false;
	}
	if(subcategory==''){
		document.getElementById('hotelsDiv').innerHTML = "Select Sub-Category Name.";
		document.getElementById('hotelsDiv').style.display="block";
		document.form.subcategory.focus();
		return false;
	}
	if(city==''){
		document.getElementById('hotelsDiv').innerHTML = "Select City Name.";
		document.getElementById('hotelsDiv').style.display="block";
		document.form.city.focus();
		return false;
	}
	if(hotel==''){
		document.getElementById('hotelsDiv').innerHTML = "Enter Hotel Name.";
		document.getElementById('hotelsDiv').style.display="block";
		document.form.hotel.focus();
		return false;
	}
	if(categoryhotel==''){
		document.getElementById('hotelsDiv').innerHTML = "Select Category of Hotel.";
		document.getElementById('hotelsDiv').style.display="block";
		document.form.categoryhotel.focus();
		return false;
	}
	return true;
}
/************************************************************************************************** 
* Function to validate service provider, End
**************************************************************************************************/

/************************************************************************************************** 
* Function to validate enquiry, Start
**************************************************************************************************/
function validationEnquiry(){
	var enquiry = document.form.enquiry.value;
	if(enquiry==''){
		document.getElementById('enquiryDiv').innerHTML = "Please describe your requirment.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.enquiry.focus();
		return false;
	}
	return true;	
}
/************************************************************************************************** 
* Function to validate enquiry, End
**************************************************************************************************/

/************************************************************************************************** 
* Function to validate enquiry, Start
**************************************************************************************************/
function validateEnquiry(){
	var alphaExp = /^[a-z A-Z]+$/;
	var emailExp = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	var name = document.form.name.value;
	var email = document.form.email.value;
	var mobile = document.form.mobile.value;
	var adults = document.form.adults.value;
	var child = document.form.child.value;
	var arrdate = document.form.arrdate.value;
	var depdate = document.form.depdate.value;
	var requirement = document.form.requirement.value;
	var validation = document.form.validation.value;
	var test=document.getElementById("hiddenvalue").value;
	if((name=='Enter your name')||(name=='')){
		document.getElementById('enquiryDiv').innerHTML = "Please Enter Your Name.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.name.focus();
		return false;
	}
	if(!name.match(alphaExp)){
		document.getElementById('enquiryDiv').innerHTML = "Name should be character.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.name.focus();
		return false;
	}
	if((email=='Enter Email Id')||(email=='')){
		document.getElementById('enquiryDiv').innerHTML = "Please enter email.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.email.focus();
		return false;
	}
	if(!email.match(emailExp)){
		document.getElementById('enquiryDiv').innerHTML = "Enter valid email.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.email.focus();
		return false;
	}
	if((mobile=='Enter Your Mobile No.')||(mobile=='')){
		document.getElementById('enquiryDiv').innerHTML = "Please Enter Mobile No.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.mobile.focus();
		return false;
	}
	if((adults=='No of Adults')||(adults=='')){
		document.getElementById('enquiryDiv').innerHTML = "Please Enter No. of Adults.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.adults.focus();
		return false;
	}
	if((child=='No of Children')||(child=='')){
		document.getElementById('enquiryDiv').innerHTML = "Please Enter No. of Children.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.child.focus();
		return false;
	}
	if((arrdate=='Arrival Date')||(arrdate=='')){
		document.getElementById('enquiryDiv').innerHTML = "Please Enter Arrival Date.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.arrdate.focus();
		return false;
	}
	if((depdate=='Departure Date')||(depdate=='')){
		document.getElementById('enquiryDiv').innerHTML = "Please Enter Departure Date.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.depdate.focus();
		return false;
	}
	if((requirement=='Describe Your Requirement with Name and Address')||(requirement=='')){
		document.getElementById('enquiryDiv').innerHTML = "Please Enter Requirement.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.requirement.focus();
		return false;
	}
	if((validation=='Enter the Verification Code')||(validation=='')){
		document.getElementById('enquiryDiv').innerHTML = "Please Enter Validation Code.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.validation.focus();
		return false;
	}
	if(validation!==test){
		document.getElementById('enquiryDiv').innerHTML = "Please Enter Correct Validation Code.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.validation.focus();
		return false;
	}
	return true;	
}
/************************************************************************************************** 
* Function to validate enquiry, End
**************************************************************************************************/
/************************************************************************************************** 
* Function to validate enquiry, Start
**************************************************************************************************/
function validateQuery(){
	var alphaExp = /^[a-z A-Z]+$/;
	var emailExp = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	var name = document.form.name.value;
	var email = document.form.email.value;
	var mobile = document.form.mobile.value;
	var adults = document.form.adults.value;
	var child = document.form.child.value;
	var arrdate = document.form.arrdate.value;
	var depdate = document.form.depdate.value;
	var country = document.form.country.value;
	var requirement = document.form.requirement.value;
	var validation = document.form.validation.value;
	var test=document.getElementById("hiddenvalue").value;
	if(name==''){
		document.getElementById('enquiryDiv').innerHTML = "Please Enter Your Name.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.name.focus();
		return false;
	}
	if(!name.match(alphaExp)){
		document.getElementById('enquiryDiv').innerHTML = "Name should be character.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.name.focus();
		return false;
	}
	if(email==''){
		document.getElementById('enquiryDiv').innerHTML = "Please enter email.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.email.focus();
		return false;
	}
	if(!email.match(emailExp)){
		document.getElementById('enquiryDiv').innerHTML = "Enter valid email.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.email.focus();
		return false;
	}
	if(mobile==''){
		document.getElementById('enquiryDiv').innerHTML = "Please Enter Mobile No.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.mobile.focus();
		return false;
	}
	if(adults==''){
		document.getElementById('enquiryDiv').innerHTML = "Please Enter No. of Adults.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.adults.focus();
		return false;
	}
	if(child==''){
		document.getElementById('enquiryDiv').innerHTML = "Please Enter No. of Children.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.child.focus();
		return false;
	}
	if(arrdate==''){
		document.getElementById('enquiryDiv').innerHTML = "Please Enter Arrival Date.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.arrdate.focus();
		return false;
	}
	if(depdate==''){
		document.getElementById('enquiryDiv').innerHTML = "Please Enter Departure Date.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.depdate.focus();
		return false;
	}
	if(country==''){
		document.getElementById('enquiryDiv').innerHTML = "Please Enter Country Name.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.country.focus();
		return false;
	}
	if(requirement==''){
		document.getElementById('enquiryDiv').innerHTML = "Please Enter Requirement.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.requirement.focus();
		return false;
	}
	if(validation==''){
		document.getElementById('enquiryDiv').innerHTML = "Please Enter Validation Code.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.validation.focus();
		return false;
	}
	if(validation!==test){
		document.getElementById('enquiryDiv').innerHTML = "Please Enter Correct Validation Code.";
		document.getElementById('enquiryDiv').style.display="block";
		document.form.validation.focus();
		return false;
	}
	return true;	
}
/************************************************************************************************** 
* Function to validate enquiry, End
**************************************************************************************************/

/************************************************************************************************** 
* Function to redirect the page, Start
**************************************************************************************************/ 
function redirectPage(pageName){
	window.location.href=(pageName);	
}
/************************************************************************************************** 
* Function to redirect the page, End 
**************************************************************************************************/ 

function get_random()
{

    var xx=null;
	var yy='xzc';
	
	xx=Math.floor(Math.random()*9);
	return xx;
	
}
function lockcode()
{
var number=new Array();
			
  number[0]='23698';
  number[1]='25546';
  number[2]='32286';
  number[3]='34018';
  number[4]='42384';
  number[5]='45823';
  number[6]='56984';
  number[7]='59456';
  number[8]='78563';
  number[9]='87956';
			 
			             var xx=get_random();			
			document.write('<input type=hidden  name=hiddenvalue id=hiddenvalue value='+number[xx]+' />');
			document.write('<img border=0 src=../images/'+number[xx]+'.jpg />');
			
}

function querycode()
{
var number=new Array();
			
  number[0]='23698';
  number[1]='25546';
  number[2]='32286';
  number[3]='34018';
  number[4]='42384';
  number[5]='45823';
  number[6]='56984';
  number[7]='59456';
  number[8]='78563';
  number[9]='87956';
			 
			             var xx=get_random();			
			document.write('<input type=hidden  name=hiddenvalue id=hiddenvalue value='+number[xx]+' />');
			document.write('<img border=0 src=images/'+number[xx]+'.jpg />');
			
}

/************************************************************************************************** 
* Function to validate Photo, Start 
**************************************************************************************************/
function validateImage(){
	var image=document.getElementById('Images').value;
	
	if(image==''){
		document.getElementById('imageDiv').innerHTML = "Please Browse Image.";
		document.getElementById('imageDiv').style.display="block";
		document.form.Images.focus();
		return false;
	}
	return true;
}
/************************************************************************************************** 
* Function to validate category, End
**************************************************************************************************/

function clearText(field){

    if (field.defaultValue == field.value) field.value = '';
    else if (field.value == '') field.value = field.defaultValue;

}

