function newwindow(url)
{
	window.open(url,'NewWindow','height=500,width=616,scrollbars=yes,toolbar=yes,menubar=yes,top=75,left=75,resizable=yes');
}
function popupinc500(url)
{
	window.open(url,'Inc500','height=500,width=616,scrollbars=yes,toolbar=yes,menubar=yes,top=50,left=100,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 exclusive()
{
	OpenWin = this.open('lcexclusivepopup.php', "lcexclusive", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,width=616,height=500,top=75,left=75");
}
function wantstoknow()
{
	OpenWin = this.open('lcwantstoknowpopup.php', "lcwantstoknow", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,width=616,height=500,top=75,left=75");
}

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


function givename()
{
	window.name="lcwa"
}
function popuptips()
{
	window.open('lcusagetipspopup.php','usagetips','height=500,width=616,scrollbars=yes,toolbar=no,menubar=no,top=50,left=100,resizable=no');
}
function popupjobboard()
{
	window.open('lcjobboard.php','JobBoard','height=602,width=542,scrollbars=yes,toolbar=no,menubar=no,top=50,left=100,resizable=no');
}
function wheredoyoupopup(url)
{
	window.open(url+'lc_where_do_you_popup.php','wheredoyoupopup','height=500,width=616,left=75,top=75,scrollbars=yes,resizable=no');
}
function nextweek(url)
{
  window.open(url,'NewWindow', "toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,width=300,height=200,top=100,left=100");
}

function mailtocolleague(title,url)
{
	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);
	window.open(strurl,'mailtocollegue','height=500,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.
//preloadimages("images/abouttma.gif","images/whatwedoa.gif","images/provenrslta.gif","images/pricinga.gif")
//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,bookmarktitle)
{
//	bookmarkurl="http://www.lawcrossing.com/";
//	bookmarktitle="LawCrossing";
	
	if (window.sidebar) 
 		{ 	// Mozilla Firefox Bookmark		
 			window.sidebar.addPanel(bookmarktitle,bookmarkurl,"");	
 		}
	if (document.all)
		window.external.AddFavorite(bookmarkurl,bookmarktitle);
}

//Made this function to work with
//left hand side quick links as add 
//logos of other sites with link to that
//side. Have to open that site in new window
// with smallar size. Made by sachin on 2006-01-07
function leftsidemenu_openadvurl(url)
{
   var openurl="";
   if(url=="lsl"){ openurl = "http://www.lawschoolloans.com"; }
   else if(url=="ar"){ openurl="http://www.attorneyresume.com"; }
   else if(url=="la"){ openurl="http://www.legalauthority.com"; }
   else if(url=="bcg"){ openurl="http://www.bcgsearch.com"; }
   else if(url=="gcc"){ openurl="http://www.gcconsulting.com/"; }
   else if(url=="judged"){ openurl="http://www.judged.com/"; }   
   else if(url=="lfs") { openurl="http://www.lawfirmstaff.com/"; }
   else if(url=="lc_postjob"){ openurl="http://www.lawcrossing.com/lctellusaboutjob.php"; }
   else if(url=="lfs_postjob"){ openurl="http://www.lawfirmstaff.com/erc/index.html"; }
   else if(url=="gcc_postjob"){ openurl="http://www.gcconsulting.com/employer_resources.html"; }
   else if(url=="bcg_postjob"){ openurl="http://www.bcgsearch.com/"; }
   else if(url=="apple_resume"){ openurl="http://www.resumeapple.com/"; }
   window.open(openurl,"","height=400,width=400,left=400,top=40,menubar=yes,location=yes,toolbar=yes,resizable=yes,scrollbars=yes,status=yes");
}

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

function opentellusabout()
{
	window.open(HTTP+'lctellusaboutjob.php','lcpostjob','resizable=yes,height=500,width=616,toolbar=no,scrollbars=yes,top=75,left=75,titlebar=yes');
}
function lcnearyou()
{
	window.open(HTTP+'lcnearyoupopup.php','lcnearyoupopup','resizable=no,height=500,width=616,toolbar=no,scrollbars=yes,top=75,left=75,titlebar=yes');
}
function whatsthis()
{
	window.open(include_path+'lcwhatisthispopup.php','LCPOPUP', 'height=500,width=616,toolbar=no,scrollbars=yes,top=75,left=75');
}
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 E-mail.");
	}
}
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 E-mail 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+'lctellafreind.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=500,width=616,toolbar=no,top=75,left=75,scrollbars=yes')
}
function qthome(include_path)
{
  	var url;
	url=HTTP+'qthomepage/qt1.htm';

	theight=screen.height-60;
	if (theight>692) theight=692;
	tmp='height='+(theight)+',width=595,toolbar=no,top=0,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;
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 lcclefunction()
{
	window.open(HTTP+'lccle_popup.php','','height=446,width=400,left=75,top=75,resizable=no');
}
function sweepstakespopup()
{
	window.open(HTTP+'sweepstakes-2006-popup.php','','height=428,width=498,left=75,top=75,resizable=no');
}
function officialrules()
{
	window.open(HTTP+'sweepstakes-2006-officialrules-popup.php','','height=500,width=718,left=150,top=150,resizable=no,scrollbars=yes');
}
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()
{
 //document.location.href = document.location.href; 
 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+15; //xPos-(w3-w1)+50;
		}
		else
		{
			lft = xPos+15; //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
// flash banners
function lcnearyoudy(path)
{
    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&font_size=9&domainName='+path+'&target=_self" /><param name="quality" value="high" /><param name="bgcolor" value="#efeee9" />');
    document.write('<embed src="'+path+'map.swf?newColor_idle=0x808080&newColor_onOver=0x0975cd&newColor_onOut=0x808080&interval=1000&font_size=9&domainName='+path+'&target=_self" quality="high" bgcolor="#efeee9" 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 lcnearyoudybig(path)
{
    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='+path+'&target=_self&font_size=6&redirectLink=lcjssearchresults.php?regionid=" /><param name="quality" value="high" /><param name="bgcolor" value="#f9f8f6" />');
    document.write('<embed src="'+path+'map_statelink.swf?newColor_idle=0x808080&newColor_onOver=0x0975cd&newColor_onOut=0x808080&interval=1000&domainName='+path+'&target=_self&font_size=6&redirectLink=lcjssearchresults.php?regionid=" quality="high" bgcolor="#f9f8f6" 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>');
}

function lcarchivesbanner()
{
   document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH="468" HEIGHT="60">');
   document.write('<PARAM NAME="movie" VALUE="http://images.lawcrossing.com/banner/jobarchives_468x60.swf">');
   document.write('<PARAM NAME="quality" VALUE="high">');
   document.write('<EMBED src="http://images.lawcrossing.com/banner/jobarchives_468x60.swf" quality="high" WIDTH="468" HEIGHT="60" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>');
   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(); }
}
/********** ADDED BY CHIRAG ON 1-SEP-2007 TO VALIDATE INPUT STRING IN SPEED SEARCH ******/
function validateInputStr(inputstr)
{
	var valid=true;
	if(inputstr.length>0)
	{
		chk1 = '#$%^*\~`<>\\?\"';
		chk3="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 ";
		for(j=0;j!=inputstr.length;j++)
		{
			ch1= inputstr.charAt(j);
			ch2= inputstr.charAt(0);
			rtn1=chk1.indexOf(ch1);
			rtn3=chk3.indexOf(ch2);
			if(rtn3 < 0)
			{
				valid=false;
				break;
			}
			else if(rtn1!=-1)
			{
				valid=false;
				break;
			}
		}
	}
	return valid;
}


/*** 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;
     	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 copy(what)
{
	window.clipboardData.setData('Text',what);
}