function confirm_password()
{
     email=frm.email.value;
	
	if (email == "")
    {
		alert("Email address can't be left empty.");
		frm.email.select();
		return false;
	}
	badStuff = ";:/,' \"\\";
	for (i=0; i<badStuff.length; i++)
    {
		badCheck = badStuff.charAt(i)
		if (email.indexOf(badCheck,0) != -1){
			alert("Please enter a valid email address");
			frm.email.select();
			return false;
		}
	}

	posOfAtSign = email.indexOf("@",1)
	if (posOfAtSign == -1)
   {
		alert("Please enter a valid email address");
			frm.email.select();
		return false;
	}
	if (email.indexOf("@",posOfAtSign+1) != -1){
		alert("Please enter a valid email address");
			frm.email.select();
		return false;
	}
	posOfPeriod = email.indexOf(".", posOfAtSign)
	if (posOfPeriod == -1){
		alert("Please enter a valid email address");
			frm.email.select();
		return false;
	}
	if (posOfPeriod+2 > email.length){
		alert("Please enter a valid email address");
			frm.email.select();
		return false;
	}
 
    if(frm.pass1.value=="")  
    {
        alert("The password field cannot be left empty");
        frm.pass1.focus();
        return false;
    }

   if(frm.repass.value=="")
   {
       alert("please enter the confirmed password");
       frm.repass.focus();
       return false;
   }
   
   if(frm.repass.value!=frm.pass1.value)
   {
       alert("The typed password and confirm password doesnt match");
       frm.repass.select();
       return false;
   }  
     
   if(frm.first_name.value=="")  
   {
        alert("The first name field cannot be left empty");
        frm.first_name.focus();
        return false;
   }
   if(frm.last_name.value=="")  
   {
       alert("The last name field cannot be left empty");
       frm.last_name.focus();
       return false;
   }

   if(frm.comp_name.value=="")  
   {
       alert("The company name field cannot be left empty");
       frm.comp_name.focus();
       return false;
   }

   if(frm.address1.value=="")  
   {
       alert("The address field cannot be left empty");
       frm.address1.focus();
       return false;
   }

   if(frm.city.value=="")  
   {
       alert("The city field cannot be left empty");
       frm.city.focus();
       return false;
   }

    if(frm.country.value=="")  
    {
      alert("The country field cannot be left empty");
      frm.country.focus();
      return false;
    }

     if(frm.zip.value=="")  
     {
         alert("The zip code field cannot be left empty");
         frm.zip.focus();
         return false;
     }

     if(frm.country_code.value=="")  
     {
        alert("The country code field cannot be left empty");
        frm.country_code.focus();
        return false;
     }
      
     if(frm.area_code.value=="")  
     {
        alert("The area code field cannot be left empty");
        frm.area_code.focus();
        return false;
     }

     if(frm.phone_no.value=="")  
     {
         alert("The phone no field cannot be left empty");
         frm.phone_no.focus();
         return false;
     }
}

function Chk_Feedback(e)
{
	 if(e.email.value=="")  
     {
         alert("Please enter your email-address ");
         e.email.focus();
         return false;
     }

	 if(e.phone.value=="")  
     {
         alert("Please enter your phone number ");
         e.phone.focus();
         return false;
     }

}

function Chk_News(e)
{
	 if(e.newsletter.value=="")  
     {
         alert("Please enter your email-address ");
         e.newsletter.focus();
         return false;
     }
}

function translator(pattern)
{

/////////////////////////////////////////////////////////////
// Script to use language convertor
// By Saradhi
/////////////////////////////////////////////////////////////

	/// Configuration parameters //////////////
	var open_in_same_window = 1;
	//////////// End Of Configuration /////////////

	var my_location = unescape(document.location.toString());
	var new_location ='';
	var new_pattern = '';
	if (my_location.indexOf('translate_c?') != -1) {
		/// From google...
		var indexof_u = my_location.indexOf('u=');
		if (indexof_u == -1) {
			new_location = document.location;
		}
		else {
			var subs = my_location.substring(indexof_u, my_location.length);
			var ss = subs.split('&');
			new_location = ss[0].substring(2, ss[0].length);
		}
	}
	else {
		new_location = document.location;
	}

	indexof_p = pattern.indexOf('|');

	var isen = '';
	if (indexof_p == -1) {
		indexof_p1 = pattern.indexOf('><');
		if (indexof_p1 == -1) {
			new_pattern = pattern;
			if (pattern == 'en') {
				isen = 1;
			}
		}
		else {
			var psplit =pattern.split('><');
			new_pattern = psplit[0]+'|'+psplit[1];
			if (psplit[1] == 'en') {
				isen = 1;
			}
		}
	}
	else {
		var psplit = pattern.split('|');
		new_pattern = psplit[0]+'|'+psplit[1];
		if (psplit[1] == 'en') {
			isen = 1;
		}
	}

	var thisurl = '';
	if (isen == 1) {
		thisurl = new_location;
	}
	else {
		thisurl = 'http://translate.google.com/translate_c?langpair=' + new_pattern + "&u=" + new_location;
	}

	if (open_in_same_window == 1) {
		window.location.href = thisurl;
	}
	else {
		if (CanAnimate ){
			msgWindow=window.open('' ,'subwindow','toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0');
			msgWindow.focus();
			msgWindow.location.href = thisurl;
		}
		else {
			msgWindow=window.open(thisurl,'subwindow','toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0');
		}
	}


}