//====================================================================================================================================================================================================================================

/* redirect_to_secure_server.js starts  for alpha*/
/*
function SendVisitorToSecureSite(pRelUrl,pIsUrlCapableOfHttps)
{var protocol=document.location.protocol;var host=document.location.hostname;if(pIsUrlCapableOfHttps==true)
{var path='https://'+host+pRelUrl;var myRegExp=/.alpha./;var matchPos1=host.search(myRegExp);if(matchPos1!=-1)
{path='http://'+host+pRelUrl;window.location.href=path;return false;}}}
*/
/* redirect_to_secure_server.js ends  for alpha*/
//-----------------------------------------------------------------------------------------------------------------
/* redirect_to_secure_server.js starts  for prod */ 
function SendVisitorToSecureSite(pRelUrl,pIsUrlCapableOfHttps)
{var protocol=document.location.protocol;var host=document.location.hostname;if(pIsUrlCapableOfHttps==true)
{var path='https://'+host+pRelUrl;var myRegExp=/.alpha./;var matchPos1=host.search(myRegExp);if(matchPos1==-1)
{window.location.href=path;return false;}}}
/* redirect_to_secure_server.js ends  for prod */
//====================================================================================================================================================================================================================================

/* dropdown.js starts */

var DDSPEED=2;var DDTIMER=2;function ddMenu(id,d){var h=document.getElementById(id+'-ddheader');var c=document.getElementById(id+'-ddcontent');clearInterval(c.timer);if(d==1){clearTimeout(h.timer);if(c.maxh&&c.maxh<=c.offsetHeight){return}
else if(!c.maxh){c.style.display='block';c.style.height='auto';c.maxh=c.offsetHeight;c.style.height='0px';}c.timer=setInterval(function(){ddSlide(c,1)},DDTIMER);}else{h.timer=setTimeout(function(){ddCollapse(c)},15);}}
function ddCollapse(c){c.timer=setInterval(function(){ddSlide(c,-1)},DDTIMER);}
function cancelHide(id){var h=document.getElementById(id+'-ddheader');var c=document.getElementById(id+'-ddcontent');clearTimeout(h.timer);clearInterval(c.timer);if(c.offsetHeight<c.maxh){c.timer=setInterval(function(){ddSlide(c,1)},DDTIMER);}}
function ddSlide(c,d){var currh=c.offsetHeight;var dist;if(d==1){dist=(Math.round((c.maxh-currh)/DDSPEED));}else{dist=(Math.round(currh/DDSPEED));}if(dist<=1&&d==1){dist=1;}c.style.height=currh+(dist*d)+'px';c.style.opacity=currh/c.maxh;c.style.filter='alpha(opacity='+(currh*100/c.maxh)+')';if((currh<2&&d!=1)||(currh>(c.maxh-2)&&d==1)){clearInterval(c.timer);}}

/* dropdown.js ends */

//====================================================================================================================================================================================================================================

/* /success/js/jquery.tabSwitch.yui.js start */

var WraperSelectorCopy;(function(b){b.fn.tabSwitch=function(i,j,l){var a=b.extend({type:"slide",cols:2,toggle:"fade",ease:40,easeType:"linear",loopback:1,width:400,height:400,index:0,speed:500,interval:5E3,step:1,wrapperClass:"",viewportClass:""},j),d=this,m=d.eq(1),c=d.eq(1).get(0),h=b.isFunction(l)?function(){b.data(c,"index",a.index);l()}:function(){b.data(c,"index",a.index)};StoreToCache=function(){b.data(c,"type",a.type);b.data(c,"toggle",a.toggle);b.data(c,"cols",a.cols);b.data(c,"ease",a.ease);b.data(c,"easeType",a.easeType);b.data(c,"index",a.index);b.data(c,"loopback",a.loopback);m.attr("style")?b.data(c,"orgAttr",m.attr("style")):b.data(c,"orgAttr","")};backFromCache=function(){d.attr("style",b.data(c,"orgAttr"));b("#ViewPort"+b.data(c)).replaceWith(d);stopAuto();b.removeData(c)};j=function(){StoreToCache();a.width&&d.width(a.width);a.height&&d.height(a.height);var e="WideDiv"+b.data(c);WraperSelectorCopy=e;d.wrapAll("<div id='"+e+"'></div>");var f=b("#"+e);f.addClass(a.wraperClass);f.css({position:"relative"});f.wrap("<div id='"+e.replace("WideDiv","ViewPort")+"'></div>");e=b("#"+e.replace("WideDiv","ViewPort"));e.width(a.width);e.height(a.height);e.css({display:"block",overflow:"hidden",position:"relative"});e.addClass(a.viewportClass);switch(a.type){case"slide":d.css({"float":"left"});f.width((a.width+2)*d.length);break;case"scroll":f.width(a.width);f.height((a.height+2)*d.length);break;case"toggle":f.width(a.width);f.height(a.height);d.css({position:"absolute",left:"-999px"});d.eq(a.index).css({left:"0px",top:"0px"});d.eq(a.index).css("opacity",1);break;case"table":f.width(a.width*a.cols);d.css("float","left")}k()};var k=function(){var e=0;if(!a.easeType)a.easeType=(c,"easeType");if(a.index>d.length-1)if(b.data(c,"loopback")!=0){a.index=0;e=-b.data(c,"ease")}else return;if(a.index<0)if(b.data(c,"loopback")!=0){a.index=d.length-1;e=b.data(c,"ease")}else return;var f="WideDiv"+b.data(c),g=b("#"+f);switch(b.data(c,"type")){case"slide":if(e!=0){e=parseInt(g.css("left").replace("px",""))+e;g.animate({left:e+"px"},a.speed,function(){g.animate({left:-(d.outerWidth(true)*a.index)+"px"},a.speed,a.easeType,h())})}else g.animate({left:-(d.outerWidth(true)*a.index)+"px"},a.speed,a.easeType,h());break;case"scroll":if(e!=0){e=parseInt(g.css("top").replace("px",""))+e;g.animate({top:e+"px"},a.speed,function(){g.animate({top:-(d.outerHeight(true)*a.index)+"px"},a.speed,a.easeType,h())})}else g.animate({top:-(d.outerHeight(true)*a.index)+"px"},a.speed,a.easeType,h());break;case"toggle":d.eq(a.index).css({left:"0px",top:"0px"});switch(b.data(c,"toggle")){case"fade":d.eq(a.index).css({opacity:0});d.eq(a.index).animate({opacity:1},a.speed);b.data(c,"index")!=a.index&&d.eq(b.data(c,"index")).animate({opacity:0},a.speed,function(){b(this).css("left",-999);h()});break;case"toggle":if(b.data(c,"index")!=a.index){d.eq(a.index).css({display:"none"});d.eq(b.data(c,"index")).slideUp(a.speed,function(){d.eq(a.index).slideDown(a.speed,function(){h()});b(this).css("left",-999)})}break;case"show":if(b.data(c,"index")!=a.index){d.eq(a.index).css({display:"none"});d.eq(b.data(c,"index")).hide(a.speed,function(){d.eq(a.index).show(a.speed,function(){h()});b(this).css("left",-999)})}break;case"noeffect":if(b.data(c,"index")!=a.index){d.eq(b.data(c,"index")).css("left",-999);h()}break}break;case"table":e=b.data(c,"cols");f=-(a.index%e)*d.width();var n=-Math.floor(a.index/e)*d.height();g.animate({left:f},a.speed,a.easeType,function(){g.animate({top:n},a.speed,a.easeType,h())});break;default:b("html,body").animate({scrollTop:d.eq(a.index).offset().top},a.speed);break}};moveStep=function(){var e=b.data(c,"index");a.index=parseInt(e)+parseInt(a.step);k()};startAuto=function(){b.data(c,"AutoSwitch",setInterval(moveStep,a.interval))};stopAuto=function(){clearInterval(b.data(c,"AutoSwitch"));b.removeData(c,"AutoSwitch")};toggleAuto=function(){isAuto()?stopAuto():startAuto()};isAuto=function(){return b.data(c,"AutoSwitch")?true:false};i||(i="");switch(i.toLowerCase()){case"index":return b.data(c,"index")?b.data(c,"index"):0;case"moveto":k();break;case"movestep":moveStep();break;case"destroy":backFromCache();break;case"create":j();break;case"isauto":return isAuto();case"toggleauto":toggleAuto();break;case"startauto":startAuto();break;case"stopauto":stopAuto();break}}})(jQuery);

/* /success/js/jquery.tabSwitch.yui.js end */

//====================================================================================================================================================================================================================================

/* /success/js/success_stories.js starts */
var WraperSelectorCopy;function startSlideTab(){var a=1,b=3;if(jQuery(".SlideTab").length>0){jQuery(".SlideTab").tabSwitch("create",{width:460,height:216});jQuery(".tabSelect").click(function(c){jQuery(".SlideTab").tabSwitch("moveTo",{index:parseInt(jQuery(this).attr("rel"))});c.preventDefault()});jQuery.ajax({type:"POST",url:"/success/stories-old.php",data:"plainorajax=ajax&choice=successpagethumbtotal",success:function(c){b=c}});jQuery(".Navnext").click(function(c){jQuery.ajax({type:"POST",url:"/success/stories-old.php",data:"plainorajax=ajax&choice=successpagethumbnext&tabIndex="+a,success:function(d){jQuery("#"+WraperSelectorCopy).append(d);jQuery("#"+WraperSelectorCopy).css("width",924+460*a)}});jQuery(".SlideTab").tabSwitch("moveStep",{step:parseInt(jQuery(this).attr("rel"))});c.preventDefault();++a;jQuery(".Navprev").attr("style","cursor:pointer; visibility:visible;");a==b&&jQuery(".Navnext").attr("style","cursor:pointer; visibility:hidden;")});jQuery(".Navprev").click(function(c){jQuery(".SlideTab").tabSwitch("moveStep",{step:parseInt(jQuery(this).attr("rel"))});c.preventDefault();--a;jQuery(".Navnext").attr("style","cursor:pointer; visibility:visible;");a==1&&jQuery(".Navprev").attr("style","cursor:pointer; visibility:hidden;");jQuery("#Tab"+(a+2)).remove()})}}
jQuery(function(){jQuery.ajax({type:"POST",url:"/success/stories-old.php",data:"plainorajax=ajax&choice=successpagethumb",success:function(a){jQuery("#Moon").html(a);startSlideTab()}})});function showBannerBigPic(a){jQuery.ajax({type:"POST",url:"/success/stories-old.php",data:"plainorajax=ajax&choice=successpagebig&getid="+a,success:function(b){jQuery("#displayphoto").html(b);jQuery("#displayphoto").fadeIn("slow")}})}
function showOriginalPicture(){var a=0;if(typeof window.innerWidth=="number")a=window.innerHeight;else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight))a=document.documentElement.clientHeight;else if(document.body&&(document.body.clientWidth||document.body.clientHeight))a=document.body.clientHeight;scrollposTop=jQuery(window).scrollTop();popupHeight=550;newY=(a-popupHeight)/2+scrollposTop;jQuery("#fade").attr("style","display: block;position: absolute;top: "+scrollposTop+"px;left: 0%; width:2000px; height:1000px; opacity:0.8; filter:alpha(opacity=80); background:url(/success/opacity_bg.png) repeat; z-index:1001;");jQuery("#load_display").attr("style","display: block;position: absolute;top: "+newY+"px;left: 20%; width:875px; height:550px; padding: 10px;border: 10px solid orange;background-color: white;z-index:1002;overflow: auto;")}
function showOriginalPicturefn(a){jQuery.ajax({type:"POST",url:"/success/stories-old.php",data:"plainorajax=ajax&choice=homepagebig&fldid="+a,success:function(b){jQuery("#bigpicturecalled").val("yes");jQuery("#load_display").html(b);showOriginalPicture()}})}
jQuery(window).scroll(function(){isbigpiccalled=jQuery("#bigpicturecalled").val();isbigpiccalled=="yes"&&showOriginalPicture()});function callAnimationForHomePageThumbs(a){successthumbtotal_val=document.getElementById("successthumbtotal").value;successthumbtotal_val=parseInt(successthumbtotal_val);for(var b=0;b<=successthumbtotal_val;b++)jQuery("#showsuccess_"+b).hide();switch(a){case"previous":successthumbcount_val=document.getElementById("successthumbcount").value;successthumbcount_val=parseInt(successthumbcount_val);jQuery("#showsuccess_"+successthumbcount_val).fadeIn("slow");successthumbcount_val=successthumbcount_val==0?successthumbtotal_val:successthumbcount_val;temp=(successthumbcount_val-1)%successthumbtotal_val;document.getElementById("successthumbcount").value=temp;break;case"next":successthumbcount_val=document.getElementById("successthumbcount").value;successthumbcount_val=parseInt(successthumbcount_val);jQuery("#showsuccess_"+successthumbcount_val).fadeIn("slow");temp=Math.abs(successthumbcount_val+1)%successthumbtotal_val;document.getElementById("successthumbcount").value=temp;break;case"start":jQuery("#showsuccess_1").fadeIn("slow");temp=2%successthumbtotal_val;document.getElementById("successthumbcount").value=temp;t=setTimeout("callAnimationForHomePageThumbs('')",5E3);break;default:successthumbcount_val=document.getElementById("successthumbcount").value;successthumbcount_val=parseInt(successthumbcount_val);jQuery("#showsuccess_"+successthumbcount_val).fadeIn("slow");temp=(successthumbcount_val+1)%successthumbtotal_val;document.getElementById("successthumbcount").value=temp;t=setTimeout("callAnimationForHomePageThumbs('')",5E3);break}}
function pauseAnimation(a){jQuery("#animcontroloff").toggle();jQuery("#animcontrolon").toggle();t=a==1?clearTimeout(t):setTimeout("callAnimationForHomePageThumbs('')",5E3)}
function nextAnimation(){jQuery("#animcontroloff").hide();jQuery("#animcontrolon").show();clearTimeout(t);callAnimationForHomePageThumbs("next")}
function previousAnimation(){jQuery("#animcontroloff").hide();jQuery("#animcontrolon").show();clearTimeout(t);callAnimationForHomePageThumbs("previous")}
function getThumbnailsForHomePage(){jQuery("#fade").attr("style","display:none;");jQuery("#load_display").attr("style","display:none;");jQuery.ajax({type:"POST",url:"/success/stories-old.php",data:"plainorajax=ajax&choice=homepagethumb",success:function(a){jQuery("#displayhomepagethumbs").html(a);callAnimationForHomePageThumbs("start")}})}
function closebigimage(){jQuery("#bigpicturecalled").val("no");jQuery("#fade").attr("style","display:none;");jQuery("#load_display").attr("style","display:none;")}
function closebigimageSuccess(){jQuery("#displayphoto").html("")}
/* /success/js/success_stories.js ends */

//====================================================================================================================================================================================================================================

/* /include/js/longtailVideo5/swfobject.js starts */

/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;

/* /include/js/longtailVideo5/swfobject.js ends */

//====================================================================================================================================================================================================================================

/* flash_detect_min.js starts */

var FlashDetect=new function(){var self=this;self.installed=false;self.raw="";self.major=-1;self.minor=-1;self.revision=-1;self.revisionStr="";var activeXDetectRules=[{"name":"ShockwaveFlash.ShockwaveFlash.7","version":function(obj){return getActiveXVersion(obj)}},{"name":"ShockwaveFlash.ShockwaveFlash.6","version":function(obj){var version="6,0,21";try{obj.AllowScriptAccess="always";version=getActiveXVersion(obj)}catch(err){}return version}},{"name":"ShockwaveFlash.ShockwaveFlash","version":function(obj){return getActiveXVersion(obj)}}];var getActiveXVersion=function(activeXObj){var version=-1;try{version=activeXObj.GetVariable("$version")}catch(err){}return version};var getActiveXObject=function(name){var obj=-1;try{obj=new ActiveXObject(name)}catch(err){obj={activeXError:true}}return obj};var parseActiveXVersion=function(str){var versionArray=str.split(",");return{"raw":str,"major":parseInt(versionArray[0].split(" ")[1],10),"minor":parseInt(versionArray[1],10),"revision":parseInt(versionArray[2],10),"revisionStr":versionArray[2]}};var parseStandardVersion=function(str){var descParts=str.split(/ +/);var majorMinor=descParts[2].split(/\./);var revisionStr=descParts[3];return{"raw":str,"major":parseInt(majorMinor[0],10),"minor":parseInt(majorMinor[1],10),"revisionStr":revisionStr,"revision":parseRevisionStrToInt(revisionStr)}};var parseRevisionStrToInt=function(str){return parseInt(str.replace(/[a-zA-Z]/g,""),10)||self.revision};self.majorAtLeast=function(version){return self.major>=version};self.minorAtLeast=function(version){return self.minor>=version};self.revisionAtLeast=function(version){return self.revision>=version};self.versionAtLeast=function(major){var properties=[self.major,self.minor,self.revision];var len=Math.min(properties.length,arguments.length);for(i=0;i<len;i++){if(properties[i]>=arguments[i]){if(i+1<len&&properties[i]==arguments[i]){continue}else{return true}}else{return false}}};self.FlashDetect=function(){if(navigator.plugins&&navigator.plugins.length>0){var type='application/x-shockwave-flash';var mimeTypes=navigator.mimeTypes;if(mimeTypes&&mimeTypes[type]&&mimeTypes[type].enabledPlugin&&mimeTypes[type].enabledPlugin.description){var version=mimeTypes[type].enabledPlugin.description;var versionObj=parseStandardVersion(version);self.raw=versionObj.raw;self.major=versionObj.major;self.minor=versionObj.minor;self.revisionStr=versionObj.revisionStr;self.revision=versionObj.revision;self.installed=true}}else if(navigator.appVersion.indexOf("Mac")==-1&&window.execScript){var version=-1;for(var i=0;i<activeXDetectRules.length&&version==-1;i++){var obj=getActiveXObject(activeXDetectRules[i].name);if(!obj.activeXError){self.installed=true;version=activeXDetectRules[i].version(obj);if(version!=-1){var versionObj=parseActiveXVersion(version);self.raw=versionObj.raw;self.major=versionObj.major;self.minor=versionObj.minor;self.revision=versionObj.revision;self.revisionStr=versionObj.revisionStr}}}}}()};FlashDetect.JS_RELEASE="1.0.4";

/* flash_detect_min.js ends */

//====================================================================================================================================================================================================================================

/* jquery.selectbox-0.5.js starts */


jQuery.fn.extend({selectbox:function(options){return this.each(function(){new jQuery.SelectBox(this,options);});}});if(!window.console){var console={log:function(msg){}}}
jQuery.SelectBox=function(selectobj,options){var opt=options||{};opt.inputClass=opt.inputClass||"selectbox";opt.containerClass=opt.containerClass||"selectbox-wrapper";opt.hoverClass=opt.hoverClass||"current";opt.currentClass=opt.selectedClass||"selected"
opt.debug=opt.debug||false;var elm_id=selectobj.id;var active=-1;var inFocus=false;var hasfocus=0;var $select=$(selectobj);var $container=setupContainer(opt);var $input=setupInput(opt);$select.hide().before($input).before($container);init();$input.click(function(){if(!inFocus){$container.toggle();}}).focus(function(){if($container.not(':visible')){inFocus=true;$container.show();}}).keydown(function(event){switch(event.keyCode){case 38:event.preventDefault();moveSelect(-1);break;case 40:event.preventDefault();moveSelect(1);break;case 13:event.preventDefault();$('li.'+opt.hoverClass).trigger('click');break;case 27:hideMe();break;}}).blur(function(){if($container.is(':visible')&&hasfocus>0){if(opt.debug)console.log('container visible and has focus')}else{hideMe();}});function hideMe(){hasfocus=0;$container.hide();}
function init(){$container.append(getSelectOptions($input.attr('id'))).hide();var width=$input.css('width');$container.width(width);}
function setupContainer(options){var container=document.createElement("div");$container=$(container);$container.attr('id',elm_id+'_container');$container.addClass(options.containerClass);return $container;}
function setupInput(options){var input=document.createElement("input");var $input=$(input);$input.attr("id",elm_id+"_input");$input.attr("type","text");$input.addClass(options.inputClass);$input.attr("autocomplete","off");$input.attr("readonly","readonly");$input.attr("tabIndex",$select.attr("tabindex"));return $input;}
function moveSelect(step){var lis=$("li",$container);if(!lis)return;active+=step;if(active<0){active=0;}else if(active>=lis.size()){active=lis.size()-1;}
lis.removeClass(opt.hoverClass);$(lis[active]).addClass(opt.hoverClass);}
function setCurrent(){var li=$("li."+opt.currentClass,$container).get(0);var ar=(''+li.id).split('_');var el=ar[ar.length-1];if((el=="Defamation Protection")||(el=="Company Formation")||(el=="Wills and Trusts"))
{$('#DebtAmount_input').fadeOut("slow");if($('#DebtAmount').val()=='')
$('#DebtAmount').val('7000');$('#DebtAmount_input').attr("disabled","disabled");}
else if(el=="1")
{$('#DebtAmount_input').fadeIn("slow");$('#DebtAmount').val('');$('#DebtAmount_input').val('Select...');$('#DebtAmount_input').attr("disabled","");}
$select.val(el);$input.val($(li).html());return true;}
function getCurrentSelected(){return $select.val();}
function getCurrentValue(){return $input.val();}
function getSelectOptions(parentid){var select_options=new Array();var ul=document.createElement('ul');$select.children('option').each(function(){var li=document.createElement('li');li.setAttribute('id',parentid+'_'+$(this).val());li.innerHTML=$(this).html();if($(this).is(':selected')){$input.val($(this).html());$(li).addClass(opt.currentClass);}
ul.appendChild(li);$(li).mouseover(function(event){hasfocus=1;if(opt.debug)console.log('over on : '+this.id);jQuery(event.target,$container).addClass(opt.hoverClass);}).mouseout(function(event){hasfocus=-1;if(opt.debug)console.log('out on : '+this.id);jQuery(event.target,$container).removeClass(opt.hoverClass);}).click(function(event){var fl=$('li.'+opt.hoverClass,$container).get(0);if(opt.debug)console.log('click on :'+this.id);$('li.'+opt.currentClass).removeClass(opt.currentClass);$(this).addClass(opt.currentClass);setCurrent();hideMe();});});return ul;}};

/* jquery.selectbox-0.5.js emds */

//====================================================================================================================================================================================================================================

/* sidemenu_video.js start */
             
 vplayer=document.getElementById("sidemenu_video_testimonials")
if(!FlashDetect.installed&&vplayer)
{
vplayer.innerHTML="Hello, you either have Flash plugin turned off or an old version of Adobe's Flash Player.<br/><br/><span style='font-weight:bold;'><a href='http://www.adobe.com/go/getflashplayer/' target='_blank'>Get the latest Flash player to view this video.</a><span/>"
}    
   
/* sidemenu_video.js end */

//==================================================================================================================================================================================================================================
/* homepage.js start*/
/* Added by Santanu on 8-03-2010*/
var url = location.pathname;
if(url == '/' || url == '/debt-free.php'){
var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";},searchString:function(data){for(var i=0;i<data.length;i++){var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;if(dataString){if(dataString.indexOf(data[i].subString)!=-1)
return data[i].identity;}
else if(dataProp)
return data[i].identity;}},searchVersion:function(dataString){var index=dataString.indexOf(this.versionSearchString);if(index==-1)return;return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init();

/* End Over Here*/
jQuery(function() {
   /*jQuery("#tabs").html('<div style="background:url(styles/oakviewlaw/img/top.gif) no-repeat; width:550px; height:18px;" ></div> <ul><li><a href="#tabs-1">Bankruptcy</a></li><li><a href="#tabs-2">Defamation Protection</a></li><li><a href="#tabs-3">Company Formation</a></li><li><a href="#tabs-4">Wills and Trusts</a></li></ul><div id="tabs-1"><h1 style="text-align:center; font-size:24px; padding-bottom:0px; margin-bottom:0px; border:none; font-family:Georgia, "Times New Roman", Times, serif;">Attorneys help you with bankruptcy filings</h1><table border="0"><tr><td rowspan="2" style="padding-left:5px 0px 0px 12px;"><div id="videoDiv" name="'+location.protocol+'" title="'+location.host+'"></div><div id="ParticularCaseStudy" style="float:left; padding-top: 5px;margin-left:13px"></div><div id="videoControls" style="float:right; padding-top:5px;"><a href="javascript:void(0);" onclick="loadVideo(\'prev\');"> <img src="/styles/oakviewlaw/img/focus-prev.gif"  width="84" height="14" /> </a>  <a style="cursor:pointer;" onclick="loadVideo(\'next\');"> <img src="/styles/oakviewlaw/img/focus-next.gif" width="62" height="14" /> </a></div></td><td style="font-size:14pt; font-family:Georgia, Times New Roman, Times, serif; text-align:left; padding:5px 5px 0px 10px; color:#767676;" valign="top">Our <a href="http://www.ovlg.com/attorneys/" onclick="return SendVisitorToSecureSite(\'/attorneys/\',true);">Attorneys</a> will help you with <strong>chapter 7</strong> and <strong>Chapter 13</strong> bankruptcy filings and other debt relief option using unique <a href="http://www.ovlg.com/waterfall-approach-debt-free.html" onclick="return SendVisitorToSecureSite(\'/waterfall-approach-debt-free.html\',true);">waterfall approach</a>. </td></tr><tr><td valign="bottom" style="text-align:center;"><!--<a href="http://www.ovlg.com/signup/" onclick="return SendVisitorToSecureSite(\'/signup/\',true);"><img src="/styles/oakviewlaw/img/signup-for-attorney-approval.png" width="245" height="39" /></a>--><a href="http://www.ovlg.com/bankruptcy/" onclick="return SendVisitorToSecureSite(\'/bankruptcy/\',true);" style="font-size:16px;font-weight:bold;color:#847D20;padding-left:10px;">Bankruptcy Law Overview</a></td></tr></table><!--<p style="text-align:left; font-size:12px; padding: 5px 20px; font-weight:bold; color:#767676;"> <span style="color:#333333;">Quick Links:</span>&nbsp;&nbsp;&nbsp;  <a href="http://www.ovlg.com/debt-settlement/" style="color:#767676;" onclick="return SendVisitorToSecureSite(\'/debt-settlement/\',true);">Debt Settlement</a> | <a href="http://www.ovlg.com/debt-consolidation/" style="color:#767676;" onclick="return SendVisitorToSecureSite(\'/debt-consolidation/\',true);">Debt Consolidation</a>  |  <a href="http://www.ovlg.com/bankruptcy/" style="color:#767676;" onclick="return SendVisitorToSecureSite(\'/bankruptcy/\',true);">Bankruptcy</a></p>--></div><div id="tabs-2"><h1 style="text-align:center; font-size:24px; border:none; font-family:Georgia, "Times New Roman", Times, serif;">Defamation Protection</h1><p style="font-size:18px; text-align:left;color:#767676;">Does your business depend on word of mouth promotion?<br/>Are your competitors spreading rumors about your business?<br/>Is your brand image at stake?We can help you in <a href="http://www.ovlg.com/reputation-protection/" onclick="return SendVisitorToSecureSite(\'/reputation-protection/\',true);">online reputation management</a> with proper legal advice and technical support. </p></div><div id="tabs-3"><h1 style="text-align:center; font-size:24px; border:none; font-family:Georgia, "Times New Roman", Times, serif;">Company Formation</h1><p  style="font-size:18px; text-align:left; padding:10px 5px 10px 10px;color:#767676;">Do you want to start your own company but not sure about the legal procedures? We have some of the best lawyers to help you in proper company formation. Meet our lawyers or <a href="http://www.ovlg.com/company-formation/" onclick="return SendVisitorToSecureSite(\'/company-formation/\',true);">learn more about company formation</a>.</p></div><div id="tabs-4"><h1 style="text-align:center; font-size:24px; border:none; font-family:Georgia, "Times New Roman", Times, serif;">Wills and Trusts</h1><p style="font-size:18px; text-align:left; padding:10px 5px 10px 10px;color:#767676;">Developing wills and trusts are not a very easy thing to do always. There may be different problems if you are not represented by experienced and qualified attorneys or lawyers. Let us talk about how we can make the process simple. Learn more about <a href="http://www.ovlg.com/wills-trusts/" onclick="return SendVisitorToSecureSite(\'/wills-trusts/\',true);">Wills and Trust</a></p></div><div style="background:url(styles/oakviewlaw/img/bottom.gif) no-repeat; float:left;width:550px;height:18px;"></div>');
    //$("#tabs").html();
    jQuery("#tabs").tabs().addClass('ui-tabs-vertical ui-helper-clearfix');
    jQuery("#tabs li").removeClass('ui-corner-top').addClass('ui-corner-left');*/
   
	
	/* For all browser configuration rather than IE 6*/

var cond_value_positive_other="245px";var cond_value_negetive_other="-245px";var animate_positive_other="+=245px";var animate_negetive_other="-=245px";var first_to_last_other="-=2000px";var last_to_first_other="+=2000px";var last_to_first_cond_other="-1960px";

    /* Configuration end over here*/

     /* For IE 6 configuration*/

var cond_value_positive_ie="249px";var cond_value_negetive_ie="-249px";var animate_positive_ie="+=249px";var animate_negetive_ie="-=249px";var first_to_last_ie="-=2032px";var last_to_first_ie="+=2032px";var last_to_first_cond_ie="-1992px";

    /* Configuration end over here*/

if(BrowserDetect.browser=="Explorer"&&BrowserDetect.version==6){var cond_value_positive=cond_value_positive_ie
var cond_value_negetive=cond_value_negetive_ie
var animate_value_positive=animate_positive_ie
var animate_value_negetive=animate_negetive_ie
var first_to_last=first_to_last_ie;var last_to_first=last_to_first_ie
var last_to_first_cond=last_to_first_cond_ie}
else{var cond_value_positive=cond_value_positive_other
var cond_value_negetive=cond_value_negetive_other
var animate_value_positive=animate_positive_other
var animate_value_negetive=animate_negetive_other
var first_to_last=first_to_last_other;var last_to_first=last_to_first_other;var last_to_first_cond=last_to_first_cond_other;}
jQuery("#HPrev").click(function(){if(jQuery(".TestimonialBlock").css("left")=="0px")
{jQuery(".TestimonialBlock").animate({"left":"+=40px"},"slow").animate({"left":first_to_last},1200);}
else if(jQuery(".TestimonialBlock").css("left")==cond_value_negetive)
{jQuery(".TestimonialBlock").animate({"left":animate_value_positive},"slow");}
else
{jQuery(".TestimonialBlock").animate({"left":animate_value_positive},"slow");}});jQuery("#HNext").click(function(){if(jQuery(".TestimonialBlock").css("left")==last_to_first_cond)
{jQuery(".TestimonialBlock").animate({"left":"-=40px"},"slow").animate({"left":last_to_first},1200);}
else if($(".TestimonialBlock").css("left")=="0px")
{jQuery(".TestimonialBlock").animate({"left":animate_value_negetive},"slow");}
else
{jQuery(".TestimonialBlock").animate({"left":animate_value_negetive},"slow");}});});function toggleDdebtAmountOption(LookingFor)
{if(LookingFor!=1)
{jQuery('#DebtAmount').animate({"opacity":0},700);jQuery('#DebtAmount').attr("disabled","disabled");}
else
{jQuery('#DebtAmount').animate({"opacity":1},700);jQuery('#DebtAmount').attr("disabled","");}}
function emptyElementOnClick(pelement)
{if((pelement.value=='Full Name')||(pelement.value=='Email')||(pelement.value=='Best Phone'))
{pelement.value='';}}
function fillElementOnBlur(pelement)
{if(pelement.value=='')
{switch(pelement.id)
{case'FirstName':pelement.value='Full Name';break;case'EmailAddress':pelement.value='Email';break;case'HomePhone':pelement.value='Best Phone';break;}}}
}
/* homepage.js end*/

//====================================================================================================================================================================================================================================

/* home-video.js start */
//removed due to multiple uses of the same file.	  
/* home-video.js end */

//===================================================================================================================================================================================================================================
/* auto-suggest.js start*/


function configuration(SearchBoxId,SuggestionBoxId,SearchButtonId){this.SearchBoxId=SearchBoxId;this.SuggestionBoxId=SuggestionBoxId;this.HighLightedClass='current';this.SuggestionTableId='Table_'+SuggestionBoxId;this.isTextBoxFocused=false;this.SearchButtonId=SearchButtonId;this.hideSuggestionsAfter=function(timeout){setTimeout('document.getElementById("'+this.SuggestionBoxId+'").style.visibility="hidden"',timeout);}
this.hideSuggestions=function(){$('#'+this.SuggestionBoxId).css('visibility','hidden');}
this.getLeft=function(oNode){var iLeft=0;while(oNode.tagName!="BODY"&&oNode.tagName!="HTML"){iLeft+=oNode.offsetLeft;oNode=oNode.offsetParent;}
return iLeft;}
this.getTop=function(oNode){var iTop=0;while(oNode.tagName!="BODY"&&oNode.tagName!="HTML"){iTop+=oNode.offsetTop;oNode=oNode.offsetParent;}
return iTop;}
this.CreateDropDownMenu=function(oEvent){var val=$('#'+this.SearchBoxId).val();var iKeyCode=oEvent.keyCode;if(iKeyCode==8||iKeyCode==46){this.getSuggestion(val,this);}else if(iKeyCode<32||(iKeyCode>=33&&iKeyCode<46)||(iKeyCode>=112&&iKeyCode<=123)){}else{this.getSuggestion(val,this);}}
this.getSuggestion=function(str,Conf){var p=/^\s*$/;var THIS=this;if(!p.test(str)){var prefix,url;prefix="/include/ajax/";url="auto-suggestion-ajax.php";$.post(prefix+url,{SearchFor:str,MaxLength:35,TableId:this.SuggestionTableId},function(data,textStatus){var p=/^\s*$/;var val=$('#'+THIS.SearchBoxId).val();if(THIS.isTextBoxFocused&&!p.test(val)){if(typeof(data.suggestion)=='object'&&data.suggestion.length>0){var suggest='',tbl='';tbl+='<table width="100%" class="auto_suggest" id="'+THIS.SuggestionTableId+'" >';for(var i=0;i<data.suggestion.length;i++){var suggest=data.suggestion[i].suggestion;var text=suggest;var re=new RegExp(data.search,"g");text=text.replace(re,'<b>'+data.search+'</b>');tbl+='<tr><td>'+text+'<input type="hidden" value="'+suggest+'" ></td></tr>';}
tbl+='</table>';var txtBox=document.getElementById(THIS.SearchBoxId);var left=THIS.getLeft(txtBox);var top=22+THIS.getTop(txtBox);$('#'+THIS.SuggestionBoxId).html(tbl).css('visibility','visible').css('left',''+left+'px').css('top',''+top+'px');$('#'+THIS.SuggestionBoxId+' td:not(.SuggestionType)').mouseover(function(){$('#'+THIS.SuggestionBoxId+' td:not(.SuggestionType)').removeClass(THIS.HighLightedClass);$(this).addClass(THIS.HighLightedClass);});$('#'+THIS.SuggestionBoxId+' td:not(.SuggestionType)').click(function(){var current_suggestion=$(this).children('input').val();$('#'+THIS.SearchBoxId).val(current_suggestion);$('#'+THIS.SearchButtonId).click();});}
else{$('#'+THIS.SuggestionBoxId).css('visibility','hidden');}}},"json");}else{$('#'+this.SuggestionBoxId).css('visibility','hidden');}}
this.HighLightSuggestion=function(oEvent){var iKeyCode=oEvent.keyCode;var Visibility=$('#'+this.SuggestionBoxId).css('visibility');if(Visibility!='hidden'){switch(iKeyCode){case 38:this.previousSuggestion();break;case 40:this.nextSuggestion();break;case 27:this.hideSuggestions();break;case 13:return true;break;}}
else{if(iKeyCode==13){return false;}}
return true;}
this.previousSuggestion=function(){var Table=document.getElementById(this.SuggestionTableId);var Rows=Table.childNodes[0].rows;var Length=Table.childNodes[0].rows.length;if(Length>0){if(this.getSelectedIndex()==-1){$(Rows[Length-1].cells[0]).addClass(this.HighLightedClass);this.selectCurrentSuggestion();return true;}
for(i=0;i<Length;i++){var Class=Rows[i].cells[0].className;if(Class.indexOf(this.HighLightedClass)!=-1){if(i>0){$(Rows[i].cells[0]).removeClass(this.HighLightedClass);if(Rows[i-1].cells[0].className.indexOf(this.SuggestionType)==-1){$(Rows[i-1].cells[0]).addClass(this.HighLightedClass);}
else{$(Rows[i-2].cells[0]).addClass(this.HighLightedClass);}
break;}}}
this.selectCurrentSuggestion();}
return true;}
this.nextSuggestion=function(){var Table=document.getElementById(this.SuggestionTableId);var Rows=Table.childNodes[0].rows;if(!Rows){return true;}
var Length=Table.childNodes[0].rows.length;if(Length>0){if(this.getSelectedIndex()==-1){$(Rows[0].cells[0]).addClass(this.HighLightedClass);this.selectCurrentSuggestion();return true;}
for(i=0;i<Length;i++){var Class=Rows[i].cells[0].className;if(Class.indexOf(this.HighLightedClass)!=-1){if(i!=Length-1){$(Rows[i].cells[0]).removeClass(this.HighLightedClass);if(Rows[i+1].cells[0].className.indexOf(this.SuggestionType)==-1){$(Rows[i+1].cells[0]).addClass(this.HighLightedClass);}
else{$(Rows[i+2].cells[0]).addClass(this.HighLightedClass);}
break;}}}
this.selectCurrentSuggestion();}
return true;}
this.getSelectedIndex=function(){var Table=document.getElementById(this.SuggestionTableId);var Length=Table.childNodes[0].rows.length;var Rows=Table.childNodes[0].rows;var i;for(i=0;i<Length;i++){var Class=Rows[i].cells[0].className;if(Class.indexOf(this.HighLightedClass)!=-1){return i;}}
return-1;}
this.selectCurrentSuggestion=function(){var Table=document.getElementById(this.SuggestionTableId);var Length=Table.childNodes[0].rows.length;var Rows=Table.childNodes[0].rows;var i,cell=null;for(i=0;i<Length;i++){var Class=Rows[i].cells[0].className;if(Class.indexOf(this.HighLightedClass)!=-1){cell=Rows[i].cells[0];$('#'+this.SearchBoxId).val($(cell).children('input').val());break;}}
return cell;}}
function ClickHandler(Conf){}
function KeyUpHandler(Conf,e){Conf.CreateDropDownMenu(e);}
function KeyDownHandler(Conf,e){return Conf.HighLightSuggestion(e);}
function BlurHandler(Conf){Conf.hideSuggestionsAfter(250);Conf.isTextBoxFocused=false;}
function FocusHandler(Conf){Conf.isTextBoxFocused=true;}
function configureAutoSuggest(Conf){$('#'+Conf.SearchBoxId).click(function(e){ClickHandler(Conf,e)});$('#'+Conf.SearchBoxId).keyup(function(e){KeyUpHandler(Conf,e)});$('#'+Conf.SearchBoxId).keydown(function(e){return KeyDownHandler(Conf,e)});$('#'+Conf.SearchBoxId).blur(function(e){BlurHandler(Conf,e)});$('#'+Conf.SearchBoxId).focus(function(e){FocusHandler(Conf,e)});}
var SearchBoxId="googlesearchboxid",SearchButtonId="sa";function enableDisableSearchButton(){/^\s*$/.test($("#"+SearchBoxId).val())?$("#"+SearchButtonId).attr("disabled",true):$("#"+SearchButtonId).removeAttr("disabled")}
function clearsearchbox(){document.getElementById(SearchBoxId).style.backgroundImage="";enableDisableSearchButton()}
function restoresearchbox(){enableDisableSearchButton();if(/^\s*$/.test($("#"+SearchBoxId).val()))document.getElementById(SearchBoxId).style.backgroundImage="url(/styles/oakviewlaw/img/google_custom_search_watermark.png)"};

/* auto-suggest.js ends */
//===================================================================================================================================================================================================================================

/* clicktocall-form-validator.js starts */

function validate_SignUpForm(frm){var value='';var errFlag=new Array();_qfMsg='';value=frm.elements['FirstName'].value;if(value==''&&!errFlag['FirstName']||value=='Full Name'){errFlag['FirstName']=true;_qfMsg=_qfMsg+'\n - First Name is required.';}
value=frm.elements['FirstName'].value;var regex=/^[a-zA-Z\s\.]+$/;if(value!=''&&!regex.test(value)&&!errFlag['FirstName']){errFlag['FirstName']=true;_qfMsg=_qfMsg+'\n - First Name can contain letters only.';}
value=frm.elements['FirstName'].value;if(value!=''&&value.length>255&&!errFlag['FirstName']){errFlag['FirstName']=true;_qfMsg=_qfMsg+'\n - The item Name: can have no more than 255 characters.';}
value=frm.elements['EmailAddress'].value;if(value==''&&!errFlag['EmailAddress']){errFlag['EmailAddress']=true;_qfMsg=_qfMsg+'\n - Email is required.';}
value=frm.elements['EmailAddress'].value;var regex=/^((\"[^\"\f\n\r\t\v\b]+\")|([\w\!\#\$\%\&'\*\+\-\~\/\^\`\|\{\}]+(\.[\w\!\#\$\%\&'\*\+\-\~\/\^\`\|\{\}]+)*))@((\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\-])+\.)+[A-Za-z\-]+))$/;if(value!=''&&!regex.test(value)&&!errFlag['EmailAddress']){errFlag['EmailAddress']=true;_qfMsg=_qfMsg+'\n - Enter valid email.';}
value=frm.elements['EmailAddress'].value;if(value!=''&&value.length>255&&!errFlag['EmailAddress']){errFlag['EmailAddress']=true;_qfMsg=_qfMsg+'\n - The item Email: can have no more than 255 characters.';}
if(frm.elements['phone1']&&frm.elements['phone2']&&frm.elements['phone3'])
{if(frm.elements['phone1'].value==''&&frm.elements['phone2'].value==''&&frm.elements['phone3'].value=='')
{value=frm.elements['HomePhone'].value;if(value==''&&!errFlag['HomePhone']){errFlag['HomePhone']=true;_qfMsg=_qfMsg+'\n - Phone number is required.';}
value=frm.elements['HomePhone'].value;if(value!=''&&value.length>20&&!errFlag['HomePhone']){errFlag['HomePhone']=true;_qfMsg=_qfMsg+'\n - The item Best Phone: can have no more than 20 characters.';}}
else
{var regexThreeNumbers=/^[0-9]{3}$/;var regexFourNumbers=/^[0-9]{4}$/;if(!regexThreeNumbers.test(frm.elements['phone1'].value)||!regexThreeNumbers.test(frm.elements['phone2'].value)||!regexFourNumbers.test(frm.elements['phone3'].value))
{errFlag['HomePhone']=true;_qfMsg=_qfMsg+'\n - Phone number is Invalid.';}}}
else
{value=frm.elements['HomePhone'].value;if(value==''&&!errFlag['HomePhone']){errFlag['HomePhone']=true;_qfMsg=_qfMsg+'\n - Phone number is required.';}
else if(value!=''&&value.length>20&&!errFlag['HomePhone']){errFlag['HomePhone']=true;_qfMsg=_qfMsg+'\n - The item Best Phone: can have no more than 20 characters.';}
else
{var regexTenNumbers=/^[0-9]{10}$/;if(!regexTenNumbers.test(frm.elements['HomePhone'].value))
{errFlag['HomePhone']=true;_qfMsg=_qfMsg+'\n - Phone number is Invalid.';}}}
if(frm.elements['ZipCode'])
{value=frm.elements['ZipCode'].value;if(value==''&&!errFlag['ZipCode']){errFlag['ZipCode']=true;_qfMsg=_qfMsg+'\n - Zip Code/Postal Code is required.';}
value=frm.elements['ZipCode'].value;if(value!=''&&value.length>20&&!errFlag['ZipCode']){errFlag['ZipCode']=true;_qfMsg=_qfMsg+'\n - The item Zip: can have no more than 20 characters.';}}
value=frm.elements['DebtAmount'].value;if(value==''&&!errFlag['DebtAmount']){errFlag['HomePhone']=true;_qfMsg=_qfMsg+'\n - Debt Amount is required.';}
if(_qfMsg!=''){_qfMsg='Invalid information entered.'+_qfMsg;_qfMsg=_qfMsg+'\nPlease correct these fields.';alert(_qfMsg);return false;}
return true;}
var isNN=(navigator.appName.indexOf("Netscape")!=-1);function enableAutoTabPhoneNumberBlock(FormName){eval('var frm = document.'+FormName);oldObject=frm.phone1;changeInputType(oldObject,'text','phone1');oldObject=frm.phone2;changeInputType(oldObject,'text','phone2');oldObject=frm.phone3;changeInputType(oldObject,'text','phone3');oldObject=frm.HomePhone;changeInputType(oldObject,'hidden','HomePhone');}
function changeInputType(oldObject,oType,Objid){var newObject=document.createElement('input');newObject.type=oType;if(oldObject.onkeyup)newObject.onkeyup=oldObject.onkeyup;if(oldObject.size)newObject.size=oldObject.size;if(oldObject.maxlength)newObject.maxlength=oldObject.maxlength;if(oldObject.value)newObject.value=oldObject.value;if(oldObject.name)newObject.name=oldObject.name;if(oldObject.id)newObject.id=oldObject.id;newObject.id=Objid;newObject.name=Objid;if(oldObject.className)newObject.className=oldObject.className;oldObject.parentNode.replaceChild(newObject,oldObject);return newObject;}
function disableAutoTabPhoneNumberBlock(FormName){eval('var frm = document.'+FormName);frm.HomePhone.type='text';frm.HomePhone.value=frm.phone1.value+'-'+frm.phone2.value+'-'+frm.phone3.value;if(frm.HomePhone.value=='--')
frm.HomePhone.value='';frm.phone1.value=frm.phone2.value=frm.phone3.value='';frm.phone1.type='hidden';frm.phone2.type='hidden';frm.phone3.type='hidden';document.getElementById(FormName+'-freeform').style.display='none';}
function autoTab(input,len,e)
{var keyCode=(isNN)?e.which:e.keyCode;var filter=(isNN)?[0,8,9]:[0,8,9,16,17,18,37,38,39,40,46];if(input.value.length>=len&&!containsElement(filter,keyCode))
{input.value=input.value.slice(0,len);input.form[(getIndex(input)+1)%input.form.length].focus();}
function containsElement(arr,ele){var found=false,index=0;while(!found&&index<arr.length)
if(arr[index]==ele)
found=true;else
index++;return found;}
function getIndex(input){var index=-1,i=0,found=false;while(i<input.form.length&&index==-1)
if(input.form[i]==input)index=i;else i++;return index;}
return true;}

/* clicktocall-form-validator.js ends */

//===================================================================================================================================================================================================================================


