function newwindow(url)
{
	window.open(url,'NewWindow','height=500,width=616,scrollbars=yes,toolbar=yes,menubar=yes,top=75,left=75,resizable=yes');
}
function whatsthis2(page)
{
	OpenWin = this.open(page, "PopupWindow", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,width=616,height=500,top=75,left=75");
}
function whatsthis1(page)
{
	OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,width=616,height=500,top=75,left=75");
}
function givename()
{
	window.name="lcwa"
}

function setfocusvalue(obj,defvalue)
{
 if(obj.value == defvalue)
    	obj.value = '';
}
	
function getfocusvalue(obj,defvalue)
{
  if(obj.value == '')
     	obj.value = defvalue;
}

function mailtocolleague(title,url,articleid,atricleurl)
{
	
	var strurl = "http://"+window.location.hostname+"/lcmailtocolleague.php?a=a";
	
  	if(typeof(title)!="undefined")
		strurl = strurl + "&title="+escape(title);
  	if(typeof(url)!="undefined")
		strurl = strurl + "&url=" + escape(url);
	if(typeof(articleid)!="undefined")
		strurl = strurl + "&articleid=" + escape(articleid);
	if(typeof(atricleurl)!="undefined")
		strurl = strurl + "&atricleurl=" + escape(atricleurl);
	
	window.open(strurl,'mailtocollegue','height=750,width=616,scrollbars=yes,toolbar=no,menubar=no,top=75,left=75');
}

function ValidatorTrim(s) {
    var m = s.match(/^\s*(\S+(\s+\S+)*)\s*$/);
    return (m == null) ? "" : m[1];
}

var dtCh= "/";
var minYear=01;
var maxYear=99;
function isInteger(s){
	var i;
    for (i = 0; i < s.length; i++){   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag){
	var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++){
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function checklength(obj,len)
{
	var temp = obj.value;
	if(temp.length < len)
		return false;
	return true;
}
//Link Rollover starts here
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//link rollover ends here

//pre load images scrip starts here
var myimages=new Array()
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}
//Enter path of images to be preloaded inside parenthesis. Extend list as desired.
//preload images scrip ends here

function lostarticlestring()
{
	document.articleform.clsarticle_keywords.value="";
}
function articlesearch()
{
	if(ValidatorTrim(document.articleform.clsarticle_keywords.value)=="")
	{
		alert("Keywords are required field");
	}
	else if(ValidatorTrim(document.articleform.clsarticle_keywords.value)=="Search Article")
	{
		alert("Keywords are required field");
	}
	else{
		document.articleform.submit();
	}
}
function lostexcarticlestring()
{
	document.articleform.clsarticle_exckeywords.value="";
}
function articleexcsearch()
{
	if(ValidatorTrim(document.articleform.clsarticle_exckeywords.value)=="")
	{
		alert("Keywords are required field");
	}
	else if(ValidatorTrim(document.articleform.clsarticle_exckeywords.value)=="Search Exclusive Articles")
	{
		alert("Keywords are required field");
	}
	else
	{
		document.articleform.action="lcexclusivearticlearchive.php";
		document.articleform.submit();
	}
}
function checkEmail(emailid)
{
	var error = "";
	if (emailid == "")
	{
		error = "You did not enter an email-address.\n";
	}
	else
	{
		var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
		if (filter.test(emailid))
			error="";
		else
			error="Please enter a valid email address.\n";
	}
	return (error)
}
function addbookmark()
{
	bookmarkurl="http://www.employmentcrossing.com/";
	bookmarktitle="EmploymentCrossing";
	if (document.all)
		window.external.AddFavorite(bookmarkurl,bookmarktitle);
}

//ADDED FROM COMMON.PHP BY BHARGAV AS ON 20060914 TO REDUCE THE SIZE OF INDEX PAGE - STARTS

function lcnearyou()
{
	window.open(HTTP+'lcnearyoupopup.php','lcnearyoupopup','resizable=no,height=300,width=188,toolbar=no,scrollbars=yes,top=80,left=100,titlebar=yes');
}
function revealjobdetail()
{
	document.formmyjobalert.clsjobalert_hdnsubmited.value=1;
	document.formmyjobalert.clsjobalert_hdnaction.value="Reveal";
	document.formmyjobalert.submit();
}
function hidejobdetail()
{
	document.formmyjobalert.clsjobalert_hdnsubmited.value=1;
	document.formmyjobalert.clsjobalert_hdnaction.value="Hide";
	document.formmyjobalert.submit();
}
function deletemyjobalert()
{
	delflag = false;
	for(i=0; i<document.formmyjobalert.elements.length; i++)
	{
		if(document.formmyjobalert.elements[i].type=="checkbox" && document.formmyjobalert.elements[i].checked==true)
			delflag = true;
	}
	if(delflag)
	{
		if(confirm("Are You sure to delete the job?"))
		{
			document.formmyjobalert.clsjobalert_hdnsubmited.value=1;
			document.formmyjobalert.clsjobalert_hdnaction.value="D";
			document.formmyjobalert.submit();
		}
	}
	else
	{
		alert("Please select atleast one job alert.");
	}
}
function emailmejobalert()
{
	delflag = false;
	for(i=0; i<document.formmyjobalert.elements.length; i++)
	{
		if(document.formmyjobalert.elements[i].type=="checkbox" && document.formmyjobalert.elements[i].checked==true)
			delflag = true;
	}
	if(delflag)
	{
		document.formmyjobalert.clsjobalert_hdnsubmited.value=1;
		document.formmyjobalert.clsjobalert_hdnaction.value="MailMe";
		document.formmyjobalert.submit();
	}
	else
	{
		alert("Please select atleast one job alert for Email.");
	}
}
function cancelemailmyjobalert()
{
	delflag = false;
	for(i=0; i<document.formmyjobalert.elements.length; i++)
	{
		if(document.formmyjobalert.elements[i].type=="checkbox" && document.formmyjobalert.elements[i].checked==true)
			delflag = true;
	}
	if(delflag)
	{
		document.formmyjobalert.clsjobalert_hdnsubmited.value=1;
		document.formmyjobalert.clsjobalert_hdnaction.value="MailCancel";
		document.formmyjobalert.submit();
	}
	else
	{
		alert("Please select atleast one job alert for Email Delete.");
	}
}
function openwinjobalert(jaid)
{
	document.formmyjobalert.clsjobalert_jaid.value=jaid;
	document.formmyjobalert.action=HTTP+'lcjsadvancesearch.php';
	document.formmyjobalert.submit();
}
function deletejobalert(jaid)
{
	if(confirm("Are You sure to delete the job?"))
	{
		document.formmyjobalert.clsjobalert_hdnsubmited.value=1;
		document.formmyjobalert.clsjobalert_hdnaction.value="D";
		document.formmyjobalert.clsjobalert_jaid.value=jaid;
		document.formmyjobalert.submit();
	}
}
//Transfer from lccommon.php to common.php. changes made by sachin on 17/06/2005. Due to display javascript in cron job emails.
function tellafriend(source)
{
	window.open(HTTP+'lctellafriend.php?source='+source,'tellafriend','height=500,width=616,left=75,top=75,scrollbars=yes,resizable=no');
}
function signinquicktour(include_path)
{//not calling from anywhere.
  	var url;
	url=HTTP+'lcsignedtour.php';
	window.open(url,'mywinhomeqt','height=411,width=578,toolbar=no,top=80,left=100,scrollbars=no')
}
function qthome(include_path)
{
  	var url;
	url=HTTP+'quicktour/qt1.htm';
    
	theight=screen.height-60;
	if (theight>692) theight=499;
	tmp='height='+(theight)+',width=595,toolbar=no,top=75,left=100,scrollbars=yes';
	window.open(url,'mywinhomeqt',tmp);
}
function searchpagevalidation()
{
	err="";
	flg=true;
	for (i = 0; i < document.forms["formjobsrch"].elements.length; i++)
	{
		if(document.forms["formjobsrch"].elements[i].type == "select-one")
		{
			flg=flg && (document.forms["formjobsrch"].elements[i].value==0);
		}
	}

	if (flg)
		err="Select atleast one item";

	if (err!="")
	{
		alert (err);
		return ;
	}
	document.forms["formjobsrch"].target="lcwa";
	document.forms["formjobsrch"].action = HTTP+'lcjssearchresults.php';
	document.forms["formjobsrch"].submit();
}
function searchjobalert(jaid)
{
	document.formmyjobalert.clsjobalert_hdnsubmited.value=1;
	document.formmyjobalert.clsjobalert_jaid.value=jaid;
	document.formmyjobalert.action=HTTP+'lcjssearchresults.php';
	document.formmyjobalert.submit();
}

var orgwinname=window.name;
var LCWAWINDOWNAME;
window.name=LCWAWINDOWNAME;
//added from common.php by bhargav as on 20060914 to reduce the size of index page - ENDS

// AJAX Code FOR INDEX.PHP PAGE - STARTS
/***********************************************
* Dynamic Ajax Content- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
var bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)
var loadedobjects=""
var rootdomain="http://"+window.location.hostname


function ajaxpage(url, containerid){
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
} 
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.onreadystatechange=function(){
loadpage(page_request, containerid)
}
if (bustcachevar) //if bust caching of external page
var bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
page_request.open('GET', url+bustcacheparameter, true)
page_request.send(null)
}

function loadpage(page_request, containerid){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
document.getElementById(containerid).innerHTML=page_request.responseText
}

function loadobjs(){
if (!document.getElementById)
return
for (i=0; i<arguments.length; i++){
var file=arguments[i]
var fileref=""
if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
if (file.indexOf(".js")!=-1){ //If object is a js file
fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", file);
}
else if (file.indexOf(".css")!=-1){ //If object is a css file
fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", file);
}
}
if (fileref!=""){
document.getElementsByTagName("head").item(0).appendChild(fileref)
loadedobjects+=file+" " //Remember this object as being already added to page
}
}
}

function testimonialpopup()
{
	window.open(HTTP+'lctestimonialpopup.php','testimonialpopup','height=500,width=616,left=75,top=75,scrollbars=yes,resizable=no');
}
// AJAX Code FOR INDEX.PHP PAGE - ENDS

//OTHER JAVASCRIPT ON INDEX.PHP PAGE - STARTS
function Swapbgon(cell)
{
 cell.className='cell1';
}
function Swapbgoff(cell)
{
 cell.className='cell1';
}
function pagerefresh()
{
 javascript:location.reload();
}
function hide_table()
{
    if (show_info == "")
    {
     createCookie('info_flag','no',0)
    }
   window.location.reload(true);
   
}
function createCookie(name,value,days)
{
 if (days)
 {
  var date = new Date();
  date.setTime(date.getTime()+(days*24*60*60*1000));
  var expires = "; expires="+date.toGMTString();
 }
 else var expires = "";
 document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name)
{
 var nameEQ = name + "=";
 var ca = document.cookie.split(';');
 for(var i=0;i < ca.length;i++)
 {
  var c = ca[i];
  while (c.charAt(0)==' ') c = c.substring(1,c.length);
  if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
 }

 return "";
}
function eraseCookie(name)
{
 createCookie(name,"",-1);
}
//OTHER JAVASCRIPT ON INDEX.PHP PAGE - ENDS

// Big Images
var xPos,yPos;
xPos = 0;
yPos = 0;
var HIDDEN = (isNS) ? 'hide' : 'hidden';
var VISIBLE = (isNS) ? 'show' : 'visible';
var isNS = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4);
function testIsValidObject(objToTest)
{
	if (null == objToTest)
	{
		return false;
	}
	if ("undefined" == typeof(objToTest) ) 
	{
		return false;
	}
	return true;
}

function pos(imgNormal)
{
	if (testIsValidObject(document.images[imgNormal]))
	{ 
		 imgElem = document.images[imgNormal];
		if(isNS)
		{
			xPos = eval(imgElem).x;
			yPos = eval(imgElem).y;
		}
		else
		{
			xPos = eval(imgElem).offsetLeft;
			tempEl = eval(imgElem).offsetParent;
			while (tempEl != null)
			{
				xPos += tempEl.offsetLeft;
				tempEl = tempEl.offsetParent;
			}
			yPos = eval(imgElem).offsetTop;
			tempEl = eval(imgElem).offsetParent;
			while (tempEl != null)
			{
				yPos += tempEl.offsetTop;
				tempEl = tempEl.offsetParent;
			}
			yPos = yPos + 65;
			xPos = xPos - 25;
		}
	}
}
 
function showObject(imgNormal,imgBig,object)
{
	var imgNormal = (imgNormal == null) ? 'img_normal' : imgNormal;
    var imgBig	 = (imgBig == null) ? 'bigimage' : imgBig;
    var object	 = (object == null) ? 'article_img_enlarge' : object;
	pos(imgNormal);
	var lft,tp;
	if (testIsValidObject(document.images[imgNormal]))
	{ 
		w1 = document.images[imgNormal].width;//Normal Image
		w2 =  345;
		w3 = document.images[imgBig].width;//Enlarged Image
		if ((w3-w1) >0)
		{
			lft =xPos-10; //xPos-(w3-w1)+50;
		}
		else
		{
			lft = xPos-10; //xPos+50;
		}
		tp = yPos;
		document.getElementById(object).style.left = lft;
		document.getElementById(object).style.top = tp-70;
		document.getElementById(object).style.borderColor = 'red';
		document.getElementById(object).style.visibility = VISIBLE;
	}
}
 
function hideObject(object)
{
	var object	 = (object == null) ? 'article_img_enlarge' : object;
	document.getElementById(object).style.visibility = HIDDEN;
}

function showObject1(imgNormal,imgBig,object)
{
	var imgNormal = (imgNormal == null) ? 'img_normal' : imgNormal;
    var imgBig	 = (imgBig == null) ? 'bigimage' : imgBig;
    var object	 = (object == null) ? 'article_img_enlarge' : object;
	pos(imgNormal);
	var lft,tp;
	if (testIsValidObject(document.images[imgNormal]))
	{ 
		w1 = document.images[imgNormal].width;//Normal Image
		w2 =  345;
		w3 = document.images[imgBig].width;//Enlarged Image
		if ((w3-w1) >0)
		{
			lft =xPos-75; //xPos-(w3-w1)+50;
		}
		else
		{
			lft = xPos-75; //xPos+50;
		}
		tp = yPos;
		document.getElementById(object).style.left = lft;
		document.getElementById(object).style.top = tp-70;
		document.getElementById(object).style.borderColor = 'red';
		document.getElementById(object).style.visibility = VISIBLE;
	}
}
//end big images

// flash banners
function scnearyoudy(path,path1)
{
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="262" height="210" id="map" align="middle">');
    document.write('<param name="allowScriptAccess" value="sameDomain" />');
    document.write('<param name="wmode" value="transparent" />');
    document.write('<param name="movie" value="'+path+'map.swf?newColor_idle=0x808080&newColor_onOver=0x0975cd&newColor_onOut=0x808080&interval=1000&domainName='+path1+'&font_size=9&target=_self" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />');
    document.write('<embed src="'+path+'map.swf?newColor_idle=0x808080&newColor_onOver=0x0975cd&newColor_onOut=0x808080&interval=1000&domainName='+path1+'&font_size=9&target=_self" quality="high" bgcolor="#ffffff" width="262" height="210" name="map" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" />');
    document.write('</object>');
}
function scnearyoudybig(path,path1)
{
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="478" height="382" id="map" align="middle">');
    document.write('<param name="allowScriptAccess" value="sameDomain" />');
    document.write('<param name="wmode" value="transparent" />');
    document.write('<param name="movie" value="'+path+'map_statelink.swf?newColor_idle=0x808080&newColor_onOver=0x0975cd&newColor_onOut=0x808080&interval=1000&domainName='+path1+'&target=_self&font_size=6&redirectLink=lcjssearchresults.php?lq=" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />');
    document.write('<embed src="'+path+'map_statelink.swf?newColor_idle=0x808080&newColor_onOver=0x0975cd&newColor_onOut=0x808080&interval=1000&domainName='+path1+'&target=_self&font_size=6&redirectLink=lcjssearchresults.php?lq=" quality="high" bgcolor="#ffffff" width="478" height="382" name="map" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" />');
    document.write('</object>');
}
//Center Popup
function NewWindow(mypage, myname, w, h, scroll) {
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
    win = window.open(mypage, myname, winprops)
    if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
function copy(what)
{
	window.clipboardData.setData('Text',what);
}

function login()
{
	var err="";
	if (ValidatorTrim(document.loginform.clslogin_username.value)=="") err+="Screen Name is required field \n";
	if (ValidatorTrim(document.loginform.clslogin_password.value)=="") err+="Password is required field";
	if (err!="") {
		alert(err);
		return false;
		}
	else
	{
		pagesubmited = true;
		document.loginform.clslogin_hdnsubmited.value="1";
	}	
}

document.onkeydown=function(e)
{
	e=e?e:typeof event!='undefined'?event:null;
	if(!e)return 0;
	if(e.keyCode == 27)
	{
		if(document.getElementById('eapopup'))
		{
			if(document.getElementById('eapopup').style.display=='block')
			{
				closedivpopup('eapopup');
			}	
		}	
		else if(document.getElementById('over'))
		{
		    if(document.getElementById('over').style.display=='block')
		    {
	  			closepopup();
		    }		
		}	
	}
		
}
function ThomasPPASurvey(HTTPS)
{
	if(document.formthomasppa.clsthomasppasurvey_termsandcondition.checked)
	{
		document.formthomasppa.action = HTTPS + "lcppauserdetail.php";
		document.formthomasppa.clsthomasppasurvey_hdnaction.value = "RetriveUserDetail";
		document.formthomasppa.clsthomasppasurvey_hdnsubmited.value = 1;
		document.formthomasppa.submit();
		createCookie("thomasppapopupstatus","No");
	}
	else
	{
		alert("Please accept Terms and Condition first.");
	}
}
function termsconditions(HTTPS)
{
	var winl = (screen.width - 800) / 2;
    var wint = (screen.height - 750) / 2;
	window.open(HTTPS + "lcppaterms.php",'Toggle','height=750,width=800,statusbar=no,toolbar=no,,scrollbars=yes,top='+wint+',left='+winl+',titlebar=no');
}
function logout()
{
	document.loginform.clslogin_hdnsubmited.value="1";
	document.loginform.submit();
}
function jobnearyou(url)
{
	window.open(url,'','width=200,height=400,top=20, left=80,scrollbars=yes');
}
function validsubmit_signup() {
	
	document.frmRightSignUP.clssignup_hdnsubmited.value="1";	
	document.frmRightSignUP.submit();
	return;
}
function showdefaulttextforlocation(obj) {
	if(!obj)
		return ; 
	if(obj.value=='')
		obj.value = 'Eg. Atlanta, GA or 30301';
}
function setloctionstring(obj)
{
	if(!obj)
		return ; 
	if(obj.value=='Eg. Atlanta, GA or 30301')
		obj.value = '';
}

/*** Below code for dynemics fill up the state value ****/

//  For AJAX Component
function createRequestObject()
{
	 var request_o;
	 var browser = navigator.appName;
	 //alert(window.opera);
	 if(!window.opera && browser == "Microsoft Internet Explorer")
	 {
	 	 request_o = new ActiveXObject("Microsoft.XMLHTTP");
	 }
	 else
	 {
	 	 request_o = new XMLHttpRequest();
	 }
	 return request_o;
}

function getStates(countryid1,stateid)
{
	stateid = stateid;
	//countryid = document.getElementById('clsuser_countryid').value;
	countryid = document.getElementById(countryid1).value;
	//var url = "http://"+window.location.hostname+"/lcgetstates.php?mode=ajax&countryid="+countryid;
	var url = "lcgetstates.php?mode=ajax&countryid="+countryid;
    http.open('get',url);
	//http.onreadystatechange = handleCountryChange;
	http.onreadystatechange = function () 
	{
			if(http.readyState == 4)
	        {
	        	handleCountryChange(stateid);
	        }
		
	};
	http.send(null);
}

function handleCountryChange(stateid)
{
	//alert(stateid);
      
		strStates = http.responseText;
		stateSelect = document.getElementById(stateid);
		stateSelect.options.length = 0;
		stateSelect.options[0] = new Option("Select State",0);
		if(strStates != '')
		{
			arrStates = strStates.split("##");	
			for(i=0; i<arrStates.length; i++)
			{
				strState = arrStates[i];
				arrState = strState.split("::")
				stateSelect.options[i+1] = new Option(arrState[1],arrState[0]);
			}
		}
	
}
 function chknewswireform(forid)
 {     
    	var err="";	
    	var truecheckbox=false;
    	if(ValidatorTrim(document.getElementById(forid).clsnewswire_email.value)=="" || ValidatorTrim(document.getElementById(forid).clsnewswire_email.value)=='Enter Your Email')
    	{
    	  err+="Email Address is required field.\n";
    	  alert(err);
    	  return false;		
    	}  
    	err += checkEmail(document.getElementById(forid).clsnewswire_email.value);
    	if(err!="")
    	{
    		alert(err);
    		return false;
    	}
    	else
    	{
    		
    		document.getElementById(forid).clsnewswire_hdnaction.value="Subscribe";
    		return true;
    	}
}
