var r={
  'special':/[\W]/g,
  'quotes':/['\''&'\"']/g,
  'notnumbers':/[^\d]/g
}

function valid(o,w){
  o.value = o.value.replace(r[w],'');
}

function textCounter(field, countfield, maxlimit)
{
   if (field.value.length > maxlimit)
	field.value = field.value.substring(0, maxlimit);
	else 	
	countfield.value = maxlimit - field.value.length;
}
function assign_value(tocontrol,valueto)
{
	tocontrol.value= valueto;
}
function Isalpha(strCharacter)
   //  check for valid numeric strings 
   {
   var strValidAlpha = "ABCDEFGHIJKLMNOPQRSTWXYZ.abcdefghijklmnopqrstuvwxyz .-";
   var strAlpha;
   var blnResult = true;

   if (strCharacter.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strCharacter.length && blnResult == true; i++)
      {
      strAlpha = strCharacter.charAt(i);
      if (strValidAlpha.indexOf(strAlpha) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }
function IsNumeric(strString)
   //  check for valid numeric strings 
   {
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }

function Email(str)
		{
			var supported = 0;
			if (window.RegExp)
			{
			var tStr = "a";
			var tReg = new RegExp(tStr);
			if (tReg.test(tStr)) supported = 1;
			}
			if (!supported)
			return (str.indexOf(".") <= 5) || (str.indexOf("@") < 0);
			var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
			var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
			return (r1.test(str) || !r2.test(str));
		}
function EmailAddr(str) 
		{
		    return str.match(/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/);
		}

//------------------------------------------------XXXX------------------------------------------------------////

 function select_cat(cat)
    {
	    document.frmhome.category.value= cat;
	} 

function mag_register(mode)
{		
 	if (document.mag_reg.first_name.value==0)
	{
		alert("Please enter your name");
		document.mag_reg.first_name.focus();
		document.mag_reg.first_name.select();
		return false;
	}
	 
	if (document.mag_reg.address1.value==0)
	{
		alert("Please enter your address!");
		document.mag_reg.address1.focus();
		document.mag_reg.address1.select();
		return false;
	}
	if (document.mag_reg.city.value==0)
	{
	alert("Please enter your city!");
	document.mag_reg.city.focus();
	document.mag_reg.city.select();
	return false;
	}
	
	if (document.mag_reg.pincode.value==0)
	{
	alert("Please enter your Postal Code!");
	document.mag_reg.pincode.focus();
	document.mag_reg.pincode.select();
	return false;
	}
	if (document.mag_reg.phone.value==0)
	{
		alert("Please enter your phone./mobile number");
		document.mag_reg.phone.focus();
		document.mag_reg.phone.select();
	return false;
	}
    if (document.mag_reg.email.value==0)
	{
		alert("Please enter your email!");
		document.mag_reg.email.focus();
		document.mag_reg.email.select();
	return false;
	}
	if (document.mag_reg.validator.value==0)
	{
		alert("Enter validation number shown in last!");
		document.mag_reg.validator.focus();
		document.mag_reg.validator.select();
	return false;
	}
	if (Email(document.mag_reg.email.value))
	{
	alert("Please enter valid email!");
	document.mag_reg.email.focus();
	document.mag_reg.email.select();
	return false;
	}
	
 
	document.mag_reg.submit();
}	

function new_register()
{	 
 
	if (document.new_reg.first_name.value==0)
	{
	alert("Please enter your name");
	document.new_reg.first_name.focus();
	document.new_reg.first_name.select();
	return false;
	}	

	if (!EmailAddr(document.new_reg.user_id.value))
	{
	alert("Please enter valid email id!");
	document.new_reg.user_id.focus();
	document.new_reg.user_id.select();
	return false;
	}		
	if (document.new_reg.address1.value==0)
	{
	alert("Please enter your address1");
	document.new_reg.address1.focus();
	document.new_reg.address1.select();
	return false;
	}
 	if (document.new_reg.adz_country.value==0)
	{
	alert("Please enter your Country");
	document.new_reg.adz_country.focus();
	document.new_reg.adz_country.select();
	return false;
	}
 	if (document.new_reg.validator.value==0)
	{
	alert("Enter the letters as are shown in the image above");
	document.new_reg.validator.focus();
	document.new_reg.validator.select();
	return false;
	}
  	if (document.new_reg.terms.checked==0)
	{
	alert("You must agree our user agreement to complete registration.");
	document.new_reg.terms.focus();
	document.new_reg.terms.select();
	return false;
	}
	document.new_reg.submit();
}

function yellow_register()
{	
	if (document.yellow_registration.company_name.value==0)
	{
		alert("Please enter your Company or Business name!");
		document.yellow_registration.company_name.focus();
		document.yellow_registration.company_name.select();
		return false;
	}	
	if (document.yellow_registration.address1.value==0)
	{
		alert("Please enter your Company or Business address!");
		document.yellow_registration.address1.focus();
		document.yellow_registration.address1.select();
		return false;
	}	
	if (document.yellow_registration.yellow_city.value==0)
	{
		alert("Please enter your City!");
		document.yellow_registration.yellow_city.focus();
		document.yellow_registration.yellow_city.select();
		return false;
	}	
	if (document.yellow_registration.yellow_country.value==0)
	{
		alert("Please enter your Country!");
		document.yellow_registration.yellow_country.focus();
		document.yellow_registration.yellow_country.select();
		return false;
	}	
	if (document.yellow_registration.company_name.value==0)
	{
		alert("Please enter your Company or Business name!");
		document.yellow_registration.company_name.focus();
		document.yellow_registration.company_name.select();
		return false;
	}	
	if (document.yellow_registration.company_name.value==0)
	{
		alert("Please enter your Company or Business name!");
		document.yellow_registration.company_name.focus();
		document.yellow_registration.company_name.select();
		return false;
	}	
	if (document.yellow_registration.company_name.value==0)
	{
		alert("Please enter your Company or Business name!");
		document.yellow_registration.company_name.focus();
		document.yellow_registration.company_name.select();
		return false;
	}	
	
	document.yellow_registration.submit();
}
function publisher()
{
 
	if (document.frmpublisher.pubtitle.value=="")
	{
		alert("Please enter your blog title");
		document.frmpublisher.pubtitle.focus();
		document.frmpublisher.pubtitle.select();
		return false;
	}

	if (document.frmpublisher.category.value==0)
	{
		alert("Select blog category");
		document.frmpublisher.category.focus();
		document.frmpublisher.category.select();
		return false;
	}	
	if (document.frmpublisher.first_name.value==0)
	{
		alert("Please enter your name");
		document.frmpublisher.first_name.focus();
		document.frmpublisher.first_name.select();
		return false;
	}
	if (document.frmpublisher.pubcontent.value==0)
	{
		alert("Please enter blog content");
		document.frmpublisher.pubcontent.focus();
		document.frmpublisher.pubcontent.select();
		return false;
	}			
	if (!EmailAddr(document.frmpublisher.user_id.value))
	{
		alert("Please enter valid email id!");
		document.frmpublisher.user_id.focus();
		document.frmpublisher.user_id.select();
		return false;
	}
	if (document.frmpublisher.validator.value==0)
	{
		alert("Please enter corrrect value showed in the image");
		document.frmpublisher.validator.focus();
		document.frmpublisher.validator.select();
		return false;
	}
	if(!document.frmpublisher.agree.checked)
	{
		alert("Please Read the Terms & Condition and check the box below"); 
		return false;
 	}
	 
	document.frmpublisher.submit();
}

function interperted_resume()

{	 
 
	if (document.intper_resume.name.value==0)
	{
	alert("Please enter your Name");
	document.intper_resume.name.focus();
	document.intper_resume.name.select();
	return false;
	}
	if (!EmailAddr(document.intper_resume.email.value))
	{
	alert("Please enter valid Email id!");
	document.intper_resume.email.focus();
	document.intper_resume.email.select();
	return false;
	}	
 	if (document.intper_resume.contact_no.value==0)
	{
	alert("Please enter your Contact No");
	document.intper_resume.contact_no.focus();
	document.intper_resume.contact_no.select();
	return false;
	}
 	if (document.intper_resume.fattach.value==0)
	{
	alert("Please attached the Resume");
	document.intper_resume.fattach.focus();
	document.intper_resume.fattach.select();
	return false;
	}
 	if (document.intper_resume.security_code.value==0)
	{
	alert("Please enter Security Code");
	document.intper_resume.security_code.focus();
	document.intper_resume.security_code.select();
	return false;
	}	
  	document.intper_resume.submit();
}

function login1()
{		
	if (Email(document.frm_login.user_id.value))
	{
		alert("Please enter valid User Id");
		document.frm_login.user_id.focus();
		document.frm_login.user_id.select();
		return false;
	}
	if (document.frm_login.password.value==0)
	{
		alert("Your password should not be empty");
		document.frm_login.password.focus();
		document.frm_login.password.select();
		return false;
	}
	if(document.frm_login.password.value.length < 6)
	{ 
		alert('Invalid! Please enter your Correct Password');
		document.frm_login.password.focus();
		document.frm_login.password.select();
		return false;
	}	
    document.frm_login.submit();

}		


function changepwd1()
{		
   
	if(document.frmchangepwd.old_password.value==0)
	{ 
	alert('Please enter your old password.');
	document.frmchangepwd.old_password.focus();
	document.frmchangepwd.old_password.select();
	return false;
	}

	if(document.frmchangepwd.password.value==0)
	{ 
	alert('Please enter your new password.');
	document.frmchangepwd.password.focus();
	document.frmchangepwd.password.select();
	return false;
	}
	
	if (document.frmchangepwd.confirm_password.value==0)
	{
	alert("Please enter confirm Password");
	document.frmchangepwd.confirm_password.focus();
	document.frmchangepwd.confirm_password.select();
	return false;
	}
	if ((document.frmchangepwd.password.value) != (document.frmchangepwd.confirm_password.value))
	{
	alert("Password mismatch retype your password");
	document.frmchangepwd.confirm_password.focus();
	document.frmchangepwd.confirm_password.select();
	return false;
	}
	if(document.frmchangepwd.password.value.length < 6)
	{ 
	alert('Password should be 6 characters Long.!');
	document.frmchangepwd.password.focus();
	document.frmchangepwd.password.select();
	return false;
	}	
	document.frmchangepwd.submit();
}		

function forgotpassword()
{

	if (Email(document.frmforgot.user_id.value))
	{
		alert("Please enter valid email, which you used while registering.");
		document.frmforgot.user_id.focus();
		document.frmforgot.user_id.selected();
		return false()
	} 
 
	document.frmforgot.submit();
 	
}
  

function contactus()
{		
 
	if (document.frmcontactus.name.value==0)
	{
	alert("Please enter your name");
	document.frmcontactus.name.focus();
	document.frmcontactus.name.select();
	return false;
	}	
  	if (Email(document.frmcontactus.email.value))
	{
	alert("Please enter your email id");
	document.frmcontactus.email.focus();
	document.frmcontactus.email.select();
	return false;
	}
	if (document.frmcontactus.phone.value==0)
	{
	alert("Please enter the phone");
	document.frmcontactus.phone.focus();
	document.frmcontactus.phone.select();
	return false;
	}	
	if (document.frmcontactus.comments.value==0)
	{
	alert("Please enter the comments");
	document.frmcontactus.comments.focus();
	document.frmcontactus.comments.select();
	return false;
	}					 
	document.frmcontactus.submit();
}			
 	

 
 

/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Michael J. Damato | http://developing.damato.net/ */
// State lists
var states = new Array();
states['India'] = new Array('Tamil Nadu','Karanataka','Kerala','Andhra Pradesh');
states['Canada'] = new Array('Alberta','British Columbia','Ontario');
states['Mexico'] = new Array('Baja California','Chihuahua','Jalisco');
states['United States'] = new Array('California','Florida','New York');

// City lists
var cities = new Array();
cities['Canada'] = new Array();
cities['Canada']['Alberta']          = new Array('Edmonton','Calgary');

cities['Canada']['British Columbia'] = new Array('Victoria','Vancouver');
cities['Canada']['Ontario']          = new Array('Toronto','Hamilton');
cities['Mexico'] = new Array();
cities['Mexico']['Baja California'] = new Array('Tijauna','Mexicali');
cities['Mexico']['Chihuahua']       = new Array('Ciudad Juárez','Chihuahua');
cities['Mexico']['Jalisco']         = new Array('Guadalajara','Chapala');
cities['United States'] = new Array();
cities['United States']['California'] = new Array('Los Angeles','San Francisco');
cities['United States']['Florida']    = new Array('Miami','Orlando');
cities['United States']['New York']   = new Array('Buffalo','new York');
cities['India'] = new Array();
cities['India']['Tamil Nadu'] = new Array('Chennai','Coimbatore','Vellore','Madurai');
cities['India']['Karanataka']    = new Array('Bengaluru / Bangalore','Mangalore','Mysoru / Mysore','Hubli');
cities['India']['Kerala']   = new Array('Calicut','Cochin','Ernakulam','Trivandrum');
cities['India']['Andhra Pradesh'] = new Array('Hyderabad / Secunderabad','Nellore','Vijayawada','Visakhapatnam');

function setStates() { 
  cntrySel = document.getElementById('country');
  stateList = states[cntrySel.value];
  changeSelect('state', stateList, stateList);
  setCities();
}
function setCities() {
  cntrySel = document.getElementById('country');
  stateSel = document.getElementById('state');
  cityList = cities[cntrySel.value][stateSel.value];
  changeSelect('city', cityList, cityList);
}
function changeSelect(fieldID, newOptions, newValues) {
  selectField = document.getElementById(fieldID);
  selectField.options.length = 0;
  for (i=0; i<newOptions.length; i++) {
    selectField.options[selectField.length] = new Option(newOptions[i], newValues[i]);
  }
}
// Multiple onload function created by: Simon Willison
// http://simonwillison.net/2004/May/26/addLoadEvent/
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } 
else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}
addLoadEvent(function() {
  setStates();
});
 
 
 //Div format new Rajiv
 function toggleLayer( whichLayer )
{
	var elem, vis;
	if( document.getElementById ) // this is the way the standards work
		elem = document.getElementById( whichLayer );
	else if( document.all ) // this is the way old msie versions work
		elem = document.all[whichLayer];
	else if( document.layers ) // this is the way nn4 works
		elem = document.layers[whichLayer];
	vis = elem.style;
	// if the style.display value is blank we try to figure it out here
	if( vis.display == '' && elem.offsetWidth != undefined && elem.offsetHeight != undefined )
		vis.display = ( elem.offsetWidth != 0 && elem.offsetHeight != 0 ) ? 'block':'none';
	vis.display = ( vis.display == '' || vis.display == 'block' ) ? 'none':'block';
}

function disableSubmit(whichButton)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		document.getElementById(whichButton).disabled = true;
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		document.all[whichButton].disabled = true;
	}
	else if (document.layers)
	{
		// this is the way nn4 works
		document.layers[whichButton].disabled = true;
	}
}

function confirmDelete()
{
    var agree=confirm("Are you sure you wish to delete this entry?");
    if (agree)
        return true;
    else
        return false;
}

function returnObjById( id )
{
	if (document.getElementById)
		var returnVar = document.getElementById(id);
	else if (document.all)
		var returnVar = document.all[id];
	else if (document.layers)
		var returnVar = document.layers[id];
	return returnVar;
}

function setHandler( tagType, clsName, eventType, func )
{
	elements = document.getElementsByTagName( tagType );
	for( var t = 0; t < elements.length; t++ )
	{
		if( elements[t].className.indexOf( clsName ) >= 0 )
		{
			var code = "elements[t]." + eventType + " = " + func;
			eval( code );
		}
	}
}

function toggleColor( )
{
	var style2 = this.style;
	style2.backgroundColor = style2.backgroundColor? "":"#FFFF00";
}

function toggleBgColor( elem )
{
	var style2 = elem.style;
	style2.backgroundColor = style2.backgroundColor? "":"#FFFF00";
}

function externalLinks( )
{
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++)
	{
		var anchor = anchors[i];
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
			anchor.target = "_blank";
	}
}

function initpage( )
{
	setHandler( 'tr', 'toggle', 'onclick', 'toggleColor' );
	setHandler( 'span', 'heading', 'onmouseover', 'toggleColor' );
	setHandler( 'span', 'heading', 'onmouseout', 'toggleColor' );
	externalLinks( );
}
if( top.location != self.location )
		top.location = self.location;
window.onload = initpage;


//new js for category like that
// close layer when click-out
var timeout	= 500;
var closetimer	= 0;
var ddmenuitem	= 0;
  
  // open hidden layer
  function m1open(id)
  {	
  	// cancel close timer
	
  	m1cancelclosetime();
  	// close old layer
  	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
	
  	// get new layer and show it
  	ddmenuitem = document.getElementById(id);
  	ddmenuitem.style.visibility = 'visible';
	//pgdiv = document.getElementById('pgpanel');
  	//pgdiv.style.visibility = 'visible';
	
  
  }
  // close showed layer
  function m1close()
  {
      if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
  }  
  function m1cancelclosetime()
  {
  	if(closetimer)
  	{
      	window.clearTimeout(closetimer);
  		closetimer = null;
  	}
  }
 
 function reg_form()
{		
	if (document.frmapp.payment_option.value==0)
	{
	alert("Please select your payment option");
	document.frmapp.payment_option.focus();
	document.frmapp.payment_option.select();
	return false;
	}
	if (Isalpha(document.frmapp.name.value) ==false)
	{
	alert("Please Enter your Name");
	document.frmapp.name.focus();
	document.frmapp.name.select();
	return false;
	}
	if (IsNumeric(document.frmapp.date.value)==false)
	{
	alert("Please Enter your Birth Date");
	document.frmapp.date.focus();
	document.frmapp.date.select();
	return false;
	}
	if (IsNumeric(document.frmapp.month.value)==false)
	{
	alert("Please Enter your Birth month");
	document.frmapp.month.focus();
	document.frmapp.month.select();
	return false;
	}
	if (IsNumeric(document.frmapp.year.value)==false)
	{
	alert("Please Enter your Birth year");
	document.frmapp.year.focus();
	document.frmapp.year.select();
	return false;
	}
	if (document.frmapp.nationality.value==0)
	{
	alert("Please select the nationality");
	document.frmapp.nationality.focus();
	document.frmapp.nationality.select();
	return false;
	}
	if (document.frmapp.native_language.value==0)
	{
	alert("Please select the native language");
	document.frmapp.native_language.focus();
	document.frmapp.native_language.select();
	return false;
	}
	if (document.frmapp.street.value==0)
	{
	alert("Please enter the street");
	document.frmapp.street.focus();
	document.frmapp.street.select();
	return false;
	}
	if (document.frmapp.city.value==0)
	{
	alert("Please enter the city");
	document.frmapp.city.focus();
	document.frmapp.city.select();
	return false;
	}
	if (document.frmapp.country.value==0)
	{
	alert("Please select the country");
	document.frmapp.country.focus();
	document.frmapp.country.select();
	return false;
	}
	if (IsNumeric(document.frmapp.postal_code.value)==false)
	{
	alert("Please enter the postal code");
	document.frmapp.postal_code.focus();
	document.frmapp.postal_code.select();
	return false;
	}
	if (IsNumeric(document.frmapp.telephone.value)==false)
	{
	alert("Please Enter the telephone");
	document.frmapp.telephone.focus();
	document.frmapp.telephone.select();
	return false;
	}		
  	if (Email(document.frmapp.email.value))
	{
	alert("Please enter your email id");
	document.frmapp.email.focus();
	document.frmapp.email.select();
	return false;
	}
	if (document.frmapp.security_code.value==0)
	{
	alert("Please enter the image as shown");
	document.frmapp.security_code.focus();
	document.frmapp.security_code.select();
	return false;
	}	 
   document.frmapp.submit();
}		

 function reg_form_modify()
{		
	if (document.frmapp.payment_option.value==0)
	{
	alert("Please select your payment option");
	document.frmapp.payment_option.focus();
	document.frmapp.payment_option.select();
	return false;
	}
	if (document.frmapp.name.value==0)
	{
	alert("Please Enter your Name");
	document.frmapp.name.focus();
	document.frmapp.name.select();
	return false;
	}
	if (document.frmapp.year.value==0)
	{
	alert("Please select the year");
	document.frmapp.year.focus();
	document.frmapp.year.select();
	return false;
	}
	if (document.frmapp.month.value==0)
	{
	alert("Please select the month");
	document.frmapp.month.focus();
	document.frmapp.month.select();
	return false;
	}
	if (document.frmapp.date.value==0)
	{
	alert("Please select the date");
	document.frmapp.date.focus();
	document.frmapp.date.select();
	return false;
	}
	if (document.frmapp.nationality.value==0)
	{
	alert("Please select the nationality");
	document.frmapp.nationality.focus();
	document.frmapp.nationality.select();
	return false;
	}
	if (document.frmapp.street.value==0)
	{
	alert("Please enter the street");
	document.frmapp.street.focus();
	document.frmapp.street.select();
	return false;
	}
	if (document.frmapp.country.value==0)
	{
	alert("Please select the country");
	document.frmapp.country.focus();
	document.frmapp.country.select();
	return false;
	}
	if (document.frmapp.telephone.value==0)
	{
	alert("Please Enter the telephone");
	document.frmapp.telephone.focus();
	document.frmapp.telephone.select();
	return false;
	}		
  	if (Email(document.frmapp.email.value))
	{
	alert("Please enter your email id");
	document.frmapp.email.focus();
	document.frmapp.email.select();
	return false;
	}	 
	if (document.frmapp.native_language.value==0)
	{
	alert("Please select the native language");
	document.frmapp.native_language.focus();
	document.frmapp.native_language.select();
	return false;
	}
	if (document.frmapp.city.value==0)
	{
	alert("Please enter the city");
	document.frmapp.city.focus();
	document.frmapp.city.select();
	return false;
	}
	if (document.frmapp.postal_code.value==0)
	{
	alert("Please enter the postal code");
	document.frmapp.postal_code.focus();
	document.frmapp.postal_code.select();
	return false;
	}
	if (document.frmapp.security_code.value==0)
	{
	alert("Please enter the image as shown");
	document.frmapp.security_code.focus();
	document.frmapp.security_code.select();
	return false;
	}	
	
document.frmapp.submit();
}		

function manage_video()
{
	if (document.frm_video.title.value==0)
	{
	alert("Please enter video title");
	document.frm_video.title.focus();
	document.frm_video.title.select();
	return false;
	}
	if (document.frm_video.description.value==0)
	{
	alert("Please enter video Description");
	document.frm_video.description.focus();
	document.frm_video.description.select();
	return false;
	}		
	if (document.frm_video.file_path.value==0)
	{
	alert("Please enter youtube.com file path!");
	document.frm_video.file_path.focus();
	document.frm_video.file_path.select();
	return false;
	}			 					
	document.frm_video.submit();
}

function videoreqform()
{
			if (document.frm_req.name.value==0)
			{
			alert("Please Enter your Full Name");
			document.frm_req.name.focus();
			document.frm_req.name.select();
			return false;
			}
			
			if (Email(document.frm_req.email.value))
			{
			alert("Please Enter your Email Id");
			document.frm_req.email.focus();
			document.frm_req.email.select();
			return false;
			}	
		 					
	document.frm_req.submit();
}

function application_form()
{		
 	if (document.jlpt_form.payment_option.value==0)
	{
	alert("Please select your payment option");
	document.jlpt_form.payment_option.focus();
	document.jlpt_form.payment_option.select();
	return false;
	}
	if (document.jlpt_form.test_level.value==0)
	{
	alert("Please select your Test Level option");
	document.jlpt_form.test_level.focus();
	document.jlpt_form.test_level.select();
	return false;
	}
	
	if (Isalpha(document.jlpt_form.name.value)==false)
	{
	alert("Please Enter your name");
	document.jlpt_form.name.focus();
	document.jlpt_form.name.select();
	return false;
	}
	
	if (IsNumeric(document.jlpt_form.date.value)==false)
	{
	alert("Please Enter your Birth Date");
	document.jlpt_form.date.focus();
	document.jlpt_form.date.select();
	return false;
	}
	
	if (IsNumeric(document.jlpt_form.month.value)==false)
	{
	alert("Please Enter your Birth Month");
	document.jlpt_form.month.focus();
	document.jlpt_form.month.select();
	return false;
	}
	
	if (IsNumeric(document.jlpt_form.year.value)==false)
	{
	alert("Please Enter your Birth Year");
	document.jlpt_form.year.focus();
	document.jlpt_form.year.select();
	return false;
	}
	if (document.jlpt_form.nationality.value==0)
	{
	alert("Please select your nationality");
	document.jlpt_form.nationality.focus();
	document.jlpt_form.nationality.select();
	return false;
	}
	if (document.jlpt_form.native_language.value==0)
	{
	alert("Please select your Native language");
	document.jlpt_form.native_language.focus();
	document.jlpt_form.native_language.select();
	return false;
	}
	if (document.jlpt_form.street.value==0)
	{
	alert("Please enter your street");
	document.jlpt_form.street.focus();
	document.jlpt_form.street.select();
	return false;
	}	
	if (document.jlpt_form.city.value==0)
	{
	alert("Please enter your city");
	document.jlpt_form.city.focus();
	document.jlpt_form.city.select();
	return false;
	}
	if (document.jlpt_form.country.value==0)
	{
	alert("Please enter your country");
	document.jlpt_form.country.focus();
	document.jlpt_form.country.select();
	return false;
	}
	
	if (IsNumeric(document.jlpt_form.postal_code.value)==false)
	{
	alert("Please enter your postal code");
	document.jlpt_form.postal_code.focus();
	document.jlpt_form.postal_code.select();
	return false;
	} 
	
	if (IsNumeric(document.jlpt_form.telephone.value)==false)
	{
	alert("Please enter your Telephone");
	document.jlpt_form.telephone.focus();
	document.jlpt_form.telephone.select();
	return false;
	}
	if (Email(document.jlpt_form.email.value))
	{
	alert("Please Enter your Email Id");
	document.jlpt_form.email.focus();
	document.jlpt_form.email.select();
	return false;
	}	
	if (document.jlpt_form.occupation.value==0)
	{
	alert("Please select your occupation");
	document.jlpt_form.occupation.focus();
	document.jlpt_form.occupation.select();
	return false;
	}
	if (document.jlpt_form.image.value==0)
	{
	alert("Please upload your photo");
	document.jlpt_form.image.focus();
	document.jlpt_form.image.select();
	return false;
	}	
document.jlpt_form.submit();
}	


function application_form_modify()
{		
 	if (document.jlpt_form.payment_option.value==0)
	{
	alert("Please select your payment option");
	document.jlpt_form.payment_option.focus();
	document.jlpt_form.payment_option.select();
	return false;
	}
	if (document.jlpt_form.name.value==0)
	{
	alert("Please Enter your name");
	document.jlpt_form.name.focus();
	document.jlpt_form.name.select();
	return false;
	}
	if (document.jlpt_form.year.value==0)
	{
	alert("Please select your year");
	document.jlpt_form.year.focus();
	document.jlpt_form.year.select();
	return false;
	}
	if (document.jlpt_form.month.value==0)
	{
	alert("Please select your month");
	document.jlpt_form.month.focus();
	document.jlpt_form.month.select();
	return false;
	}
	if (document.jlpt_form.date.value==0)
	{
	alert("Please select your date");
	document.jlpt_form.date.focus();
	document.jlpt_form.date.select();
	return false;
	}
	if (document.jlpt_form.nationality.value==0)
	{
	alert("Please select your nationality");
	document.jlpt_form.nationality.focus();
	document.jlpt_form.nationality.select();
	return false;
	}
	if (document.jlpt_form.street.value==0)
	{
	alert("Please enter your street");
	document.jlpt_form.street.focus();
	document.jlpt_form.street.select();
	return false;
	}	
	if (document.jlpt_form.street.value==0)
	{
	alert("Please enter your street");
	document.jlpt_form.street.focus();
	document.jlpt_form.street.select();
	return false;
	}
	if (document.jlpt_form.country.value==0)
	{
	alert("Please enter your country");
	document.jlpt_form.country.focus();
	document.jlpt_form.country.select();
	return false;
	}
	if (document.jlpt_form.telephone.value==0)
	{
	alert("Please enter your Telephone");
	document.jlpt_form.telephone.focus();
	document.jlpt_form.telephone.select();
	return false;
	}
	if (Email(document.jlpt_form.email.value))
	{
	alert("Please Enter your Email Id");
	document.jlpt_form.email.focus();
	document.jlpt_form.email.select();
	return false;
	}	
	if (document.jlpt_form.sex.value==0)
	{
	alert("Please select your sex");
	document.jlpt_form.sex.focus();
	document.jlpt_form.sex.select();
	return false;
	}
	if (document.jlpt_form.native_language.value==0)
	{
	alert("Please select your Native language");
	document.jlpt_form.native_language.focus();
	document.jlpt_form.native_language.select();
	return false;
	}
	if (document.jlpt_form.occupation.value==0)
	{
	alert("Please select your occupation");
	document.jlpt_form.occupation.focus();
	document.jlpt_form.occupation.select();
	return false;
	}
	if (document.jlpt_form.city.value==0)
	{
	alert("Please enter your city");
	document.jlpt_form.city.focus();
	document.jlpt_form.city.select();
	return false;
	}
	if (document.jlpt_form.postal_code.value==0)
	{
	alert("Please enter your postal code");
	document.jlpt_form.postal_code.focus();
	document.jlpt_form.postal_code.select();
	return false;
	} 
 
	if (document.jlpt_form.security_code.value==0)
	{
		alert("Please enter the image as shown");
		document.jlpt_form.security_code.focus();
		document.jlpt_form.security_code.select();
		return false;
	}
document.jlpt_form.submit();
}	

function addopp()
	{	
	    if (document.frmopportunities.category.value==0)
		{
		alert("Please enter the category");
		document.frmopportunities.category.focus();
		document.frmopportunities.category.select();
		return false;
		}
		if (document.frmopportunities.position.value==0)
		{
		alert("Please enter the position");
		document.frmopportunities.position.focus();
		document.frmopportunities.position.select();
		return false;
		}

		if (document.frmopportunities.responsibility.value==0)
		{
		alert("Please enter the Responsibility");
		document.frmopportunities.responsibility.focus();
		document.frmopportunities.responsibility.select();
		return false;
		}
		
		if (document.frmopportunities.skills.value==0)
		{
		alert("Please enter the skills");
		document.frmopportunities.skills.focus();
		document.frmopportunities.skills.select();
		return false;
		}
		
		if (document.frmopportunities.qualification.value==0)
		{
		alert("Please enter the qualification");
		document.frmopportunities.qualification.focus();
		document.frmopportunities.qualification.select();
		return false;
		}
		
		if (document.frmopportunities.experience.value==0)
		{
		alert("Please enter the experience");
		document.frmopportunities.experience.focus();
		document.frmopportunities.experience.select();
		return false;
		}
		
		if (document.frmopportunities.jlpt_level.value==0)
		{
		alert("Please enter the  Japanese level");
		document.frmopportunities.jlpt_level.focus();
		document.frmopportunities.jlpt_level.select();
		return false;
		}
	
		if (document.frmopportunities.no_vacancy.value==0)
		{
		alert("Please enter the vacancy");
		document.frmopportunities.no_vacancy.focus();
		document.frmopportunities.no_vacancy.select();
		return false;
		}
			
		if (document.frmopportunities.location.value==0)
		{
		alert("Please enter the location");
		document.frmopportunities.location.focus();
		document.frmopportunities.location.select();
		return false;
		}
	
		document.frmopportunities.submit();
	}
	
	function update_currency()
	{	
	    if (document.frmcurrency.usd_currency.value==0)
		{
		alert("Please enter the course name");
		document.frmcurrency.usd_currency.focus();
		document.frmcurrency.usd_currency.select();
		return false;
		}
		document.frmcurrency.submit();
}

function addnewcourse()
	{	
	    if (document.frmnewcourse.course_name.value==0)
		{
		alert("Please enter the course name");
		document.frmnewcourse.course_name.focus();
		document.frmnewcourse.course_name.select();
		return false;
		}
		if (document.frmnewcourse.course_description.value==0)
		{
		alert("Please enter the course description");
		document.frmnewcourse.course_description.focus();
		document.frmnewcourse.course_description.select();
		return false;
		}
		if (document.frmnewcourse.course_duration.value==0)
		{
		alert("Please enter the course Duration");
		document.frmnewcourse.course_duration.focus();
		document.frmnewcourse.course_duration.select();
		return false;
		}
		if (document.frmnewcourse.course_time.value==0)
		{
		alert("Please enter the course time");
		document.frmnewcourse.course_time.focus();
		document.frmnewcourse.course_time.select();
		return false;
		}
		if (document.frmnewcourse.course_batch.value==0)
		{
		alert("Please enter the course Batch");
		document.frmnewcourse.course_batch.focus();
		document.frmnewcourse.course_batch.select();
		return false;
		}
		if (document.frmnewcourse.commencement_date.value==0)
		{
		alert("Please enter the commencement date");
		document.frmnewcourse.commencement_date.focus();
		document.frmnewcourse.commencement_date.select();
		return false;
		}
		if (document.frmnewcourse.price.value==0)
		{
		alert("Please enter the price");
		document.frmnewcourse.price.focus();
		document.frmnewcourse.price.select();
		return false;
		}
		document.frmnewcourse.submit();
	}
function resume_val()
{
			if (document.frm_resume.uname.value==0)
			{
			alert("Please Enter your Full Name");
			document.frm_resume.uname.focus();
			document.frm_resume.uname.select();
			return false;
			}
			
			if (Email(document.frm_resume.mailid.value))
			{
			alert("Please Enter your Email Id");
			document.frm_resume.mailid.focus();
			document.frm_resume.mailid.select();
			return false;
			}	
		 					
	document.frm_resume.submit();
} 
function addjob()
{
			if (document.frmjobsadd.job_title.value==0)
			{
			alert("Please Enter your Job Title");
			document.frmjobsadd.job_title.focus();
			document.frmjobsadd.job_title.select();
			return false;
			}
			if (document.frmjobsadd.jobs_description.value==0)
			{
			alert("Please Enter your Description");
			document.frmjobsadd.jobs_description.focus();
			document.frmjobsadd.jobs_description.select();
			return false;
			}
	  document.frmjobsadd.submit();
} 

function tranrequest()
{		
 
	if (Isalpha(document.frmrequest.name.value)==false)
	{
	alert("Please enter your name");
	document.frmrequest.name.focus();
	document.frmrequest.name.select();
	return false;
	}	
  	if (Email(document.frmrequest.email.value))
	{
	alert("Please enter your email id");
	document.frmrequest.email.focus();
	document.frmrequest.email.select();
	return false;
	} 
	if (IsNumeric(document.frmrequest.phone.value)==false)
	{
	alert("Please enter the Phone No");
	document.frmrequest.phone.focus();
	document.frmrequest.phone.select();
	return false;
	}		
	if (document.frmrequest.comments.value==0)
	{
	alert("Please enter the comments");
	document.frmrequest.comments.focus();
	document.frmrequest.comments.select();
	return false;
	}
	if (document.frmrequest.security_code.value==0)
	{
	alert("Please enter the Security Code");
	document.frmrequest.security_code.focus();
	document.frmrequest.security_code.select();
	return false;
	}					 
	document.frmrequest.submit();
}			

function traninterpretrequest()
{		
 
	if (Isalpha(document.frminterpret.name.value)==false)
	{
	alert("Please enter your name");
	document.frminterpret.name.focus();
	document.frminterpret.name.select();
	return false;
	}	
  	if (Email(document.frminterpret.email.value))
	{
	alert("Please enter your email id");
	document.frminterpret.email.focus();
	document.frminterpret.email.select();
	return false;
	}
	 if (document.frminterpret.phone.value==0)
	{
	alert("Please enter the phone");
	document.frminterpret.phone.focus();
	document.frminterpret.phone.select();
	return false;
	}	
	if (document.frminterpret.comments.value==0)
	{
	alert("Please enter the comments");
	document.frminterpret.comments.focus();
	document.frminterpret.comments.select();
	return false;
	}					 
	document.frminterpret.submit();
}	

function newsform()
{		
 
	if (document.frmnews.news_title.value==0)
	{
	alert("Please enter your News Title");
	document.frmnews.news_title.focus();
	document.frmnews.news_title.select();
	return false;
	}	
  	
	if (document.frmnews.news_message.value==0)
	{
	alert("Please enter the News Message");
	document.frmnews.news_message.focus();
	document.frmnews.news_message.select();
	return false;
	}					 
	document.frmnews.submit();
}	
function addbulkletter()
{
			if (document.bulkletters.letter_title.value==0)
			{
			alert("Please Enter your Letter Title");
			document.bulkletters.letter_title.focus();
			document.bulkletters.letter_title.select();
			return false;
			}
			if (document.bulkletters.letter_desc.value==0)
			{
			alert("Please Enter your Letter Messages");
			document.bulkletters.letter_desc.focus();
			document.bulkletters.letter_desc.select();
			return false;
			}
			if (Email(document.bulkletters.unsubscriber.value))
			{
			alert("Please enter your Unsubscriber Mail Id");
			document.bulkletters.unsubscriber.focus();
			document.bulkletters.unsubscriber.select();
			return false;
			}
	  document.bulkletters.submit();
} 
function addbulkgroup()
{
			if (document.bulkgroups.group_name.value==0)
			{
			alert("Please Enter your Group Name");
			document.bulkgroups.group_name.focus();
			document.bulkgroups.group_name.select();
			return false;
			}
			if (document.bulkgroups.group_desc.value==0)
			{
			alert("Please Enter your Group Messages");
			document.bulkgroups.group_desc.focus();
			document.bulkgroups.group_desc.select();
			return false;
			}
	  document.bulkgroups.submit();
}

function addbatch()
{
			if (document.frmbatchadd.batch_name.value==0)
			{
			alert("Please Enter your Batch Name");
			document.frmbatchadd.batch_name.focus();
			document.frmbatchadd.batch_name.select();
			return false;
			}
			if (document.frmbatchadd.batch_details.value==0)
			{
			alert("Please Enter your Batch Details");
			document.frmbatchadd.batch_details.focus();
			document.frmbatchadd.batch_details.select();
			return false;
			}
	  document.frmbatchadd.submit();
} 
function addvideorecord()
{
			if (document.frmvideorecordadd.title.value==0)
			{
			alert("Please Enter your Title");
			document.frmvideorecordadd.title.focus();
			document.frmvideorecordadd.title.select();
			return false;
			}
			if (document.frmvideorecordadd.video_path.value==0)
			{
			alert("Please Enter your Video Path");
			document.frmvideorecordadd.video_path.focus();
			document.frmvideorecordadd.video_path.select();
			return false;
			}
	  document.frmvideorecordadd.submit();
} 