var beenFocused=false;document.onmousedown=markFocused;function markFocused(){beenFocused=true}function setFocusOnLoad(){if(!beenFocused){loader()}}function isBlank(){value=document.search_form.elements['sp-q'].value if(value==""){alert("Please enter search word");return false}else{return true}}function getSecureFlash(width,height,file,loop,alternate,classid){if(MM_FlashCanPlay){var oeTags='<OBJECT CLASSID="'+classid+'"'+'width="'+width+'" HEIGHT="'+height+'"'+'CODEBASE="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'+'<PARAM NAME="MOVIE" VALUE="'+file+'">'+'<PARAM NAME="PLAY" VALUE="true">'+'<PARAM NAME="LOOP" VALUE="'+loop+'">'+'<PARAM NAME="QUALITY" VALUE="high">'+'<PARAM NAME="MENU" VALUE="false">'+'<EMBED SRC="'+file+'"'+'width="'+width+'" HEIGHT="'+height+'"'+'PLAY="true"'+'LOOP="'+loop+'"'+'QUALITY="high"'+'MENU="false"'+'TYPE="application/x-shockwave-flash"'+'PLUGINSPAGE="https://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">'+'</EMBED>'+'</OBJECT>';document.write(oeTags)}else{var alternateContent='<IMG SRC="'+alternate+'" HEIGHT="'+height+'" width="'+width+'" BORDER="0">'document.write(alternateContent)}}function getFlash(width,height,file,loop,alternate,classid,usemap){if(MM_FlashCanPlay){var curProtocol="http:";if(null!=top.location.protocol&&top.location.protocol=='https:'){curProtocol="https:"}var oeTags='<OBJECT CLASSID="'+classid+'"'+'width="'+width+'" HEIGHT="'+height+'"'+'CODEBASE="'+curProtocol+'//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'+'<PARAM NAME="MOVIE" VALUE="'+file+'">'+'<PARAM NAME="PLAY" VALUE="true">'+'<PARAM NAME="LOOP" VALUE="'+loop+'">'+'<PARAM NAME="QUALITY" VALUE="high">'+'<PARAM NAME="MENU" VALUE="false">'+'<EMBED SRC="'+file+'"'+'width="'+width+'" HEIGHT="'+height+'"'+'PLAY="true"'+'LOOP="'+loop+'"'+'QUALITY="high"'+'MENU="false"'+'TYPE="application/x-shockwave-flash"'+'PLUGINSPAGE="'+curProtocol+'//www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">'+'</EMBED>'+'</OBJECT>';document.write(oeTags)}else{var alternateContent='<IMG SRC="'+alternate+'" HEIGHT="'+height+'" width="'+width+'" BORDER="0" usemap="'+usemap+'">'document.write(alternateContent)}}function globalNavOver(image_name){image_name.src="/web-common/assets/rt_blu_arrow.gif"}function globalNavOut(image_name){image_name.src="/web-common/assets/1x1_spacer.gif"}function swapImage(daImage,daSrc){var objStr,obj;if(document.images){if(typeof(daImage)=='string'){objStr='document.'+daImage;obj=eval(objStr);obj.src=daSrc}else if((typeof(daImage)=='object')&&daImage&&daImage.src){daImage.src=daSrc}}}var curPopupWindow=null;function openWindow(url,winName,width,height,center,winType){var xposition=50;var yposition=50;var location,menubar,resizable,scrollbars,status,titlebar;if((parseInt(navigator.appVersion)>=4)&&(center)){xposition=(screen.width-800)/2;yposition=(screen.height-600)/2}if(winType=="1"){location=1;menubar=1;resizable=1;scrollbars=1;status=1;titlebar=1}else if(winType=="2"){location=0;menubar=0;resizable=0;scrollbars=0;status=0;titlebar=1}else if(winType=="3"){location=0;menubar=0;resizable=1;scrollbars=1;status=0;titlebar=1}else if(winType=="4"){location=0;menubar=0;resizable=0;scrollbars=1;status=0;titlebar=0}else if(winType=="5"){location=0;menubar=1;resizable=0;scrollbars=1;status=0;titlebar=0}else{location=1;menubar=1;resizable=1;scrollbars=1;status=1;titlebar=1}args="width="+width+","+"height="+height+","+"location="+location+","+"menubar="+menubar+","+"resizable="+resizable+","+"scrollbars="+scrollbars+","+"status="+status+","+"titlebar="+titlebar+","+"toolbar=0,"+"hotkeys=0,"+"screenx="+xposition+","+"screeny="+yposition+","+"left="+xposition+","+"top="+yposition;if(curPopupWindow!=null){curPopupWindow.close()}curPopupWindow=window.open(url,winName,args,false);curPopupWindow.focus()}function switchWindows(url){parent.opener.location.href=url}function switchAndClose(url){top.opener.location.href=url;top.close();top.opener.focus()}function goto_URL(object){parent.frames[0].location.replace(object.options[object.selectedIndex].value)}function goto_URL_2(object){location.replace(object.options[object.selectedIndex].value)}function loader(){var username=document.login_form.username.value;if(username!=null&&username.length>0){document.login_form.pw.focus()}else{document.login_form.username.focus()}}function handleLogin(){document.login_form.un.value=document.login_form.username.value;document.login_form.width.value=screen.width;document.login_form.height.value=screen.height}function sforceLoader(){var username=document.login_form.un.value;if(username!=null&&username.length>0){document.login_form.pw.focus()}else{document.login_form.un.focus()}}function isValidPhoneNumber(num,requiredDigits){var digits=0;if(num==null)return false;for(i=0;i<num.length;i++){var c=num.charCodeAt(i);if((c>=48)&&(c<=57))digits++}return(digits>=requiredDigits)}function isValidEmail(emailad){var exclude=/[^@\-\.\w]|^[_@\.\-]|[\._\-]{2}|[@\.]{2}|(@)[^@]*\1/;var check=/@[\w\-]+\./;var checkend=/\.[a-zA-Z]{2,4}$/;if(((emailad.search(exclude)!=-1)||(emailad.search(check))==-1)||(emailad.search(checkend)==-1)){return false}else{return true}}function isValidEmails(){var recipientEmail=document.forms[0].recipientEmail.value;var senderEmail=document.forms[0].senderEmail.value;var error=false;var errorMessage="The following errors are present:\n\n";if(recipientEmail.indexOf(',')<0){if(!isValidEmail(recipientEmail)){error=true;errorMessage+="The recipient's Email address is not valid\n"}}else{var addresses=new Array();addresses=recipientEmail.split(',');var currentAddress;var i;for(var i=0;i<addresses.length;i++){if(!isValidEmail(trim(addresses[i]))){error=true}}if(i>10){error=true;errorMessage+="Only 10 addresses are allowed\n"}if(error){errorMessage+="A recipient's Email address is not valid\n"}}if(!isValidEmail(senderEmail)){error=true;errorMessage+="The sender's Email address is not valid"}if(senderEmail.indexOf("crc.com")>=0){error=true;errorMessage+="The sender's Email address can not contain 'crc.com'."}if(error){alert(errorMessage);return false}else{return true}}function trim(inputString){if(typeof inputString!="string"){return inputString}var retValue=inputString;var ch=retValue.substring(0,1);while(ch==" "){retValue=retValue.substring(1,retValue.length);ch=retValue.substring(0,1)}ch=retValue.substring(retValue.length-1,retValue.length);while(ch==" "){retValue=retValue.substring(0,retValue.length-1);ch=retValue.substring(retValue.length-1,retValue.length)}while(retValue.indexOf("  ")!=-1){retValue=retValue.substring(0,retValue.indexOf("  "))+retValue.substring(retValue.indexOf("  ")+1,retValue.length)}return retValue}function gotoURL(object){window.location.href=object.options[object.selectedIndex].value}function validateForm(formId){p=new Array();if(formId==1){p[6]="Priority\n";p[7]="Name\n";p[8]="Company Name\n";p[9]="valid E-mail Address\n";p[10]="Subject\n";p[11]="Comment\n"}else if(formId==2){p[4]="Company\n";p[5]="Street\n";p[6]="City\n";p[7]="State\n";p[8]="Zip\n";p[9]="Country\n";p[10]="Industry\n";p[11]="Revenue\n";p[12]="Company URL\n";p[13]="Company HQ\n";p[14]="First Name\n";p[15]="Last Name\n";p[16]="Title\n";p[17]="Telephone Number\n";p[18]="valid E-mail Address\n";p[19]="Number of Personnel\n";p[20]="Referral Source\n";p[22]="Currently a Customer\n";p[25]="Primary Area of Interest\n";p[27]="Business Goals\n";p[28]="Business Goals\n";p[29]="Business Goals\n";p[30]="Business Goals\n";p[31]="Business Goals\n";p[32]="Business Goals\n"}else if(formId==3){p[5]="Company\n";p[6]="Street\n";p[7]="City\n";p[8]="State\n";p[9]="Zip\n";p[10]="Country\n";p[11]="Industry\n";p[12]="Number of Employees\n";p[13]="Annual Revenue\n";p[14]="Company URL\n";p[15]="First Name\n";p[16]="Last Name\n";p[17]="Title\n";p[18]="Telephone Number\n";p[19]="Fax Number\n";p[20]="Mobile Number\n";p[21]="valid E-mail Address\n";p[23]="3a\n";p[25]="3b\n";p[27]="3c\n";p[29]="4a\n";p[31]="4b\n";p[33]="4c\n";p[35]="4d\n";p[37]="5a\n";p[39]="6a\n";p[41]="7a\n";p[43]="7b\n";p[45]="7c\n";p[47]="7d\n"}else if(formId==4){p[5]="First Name\n";p[6]="Last Name\n";p[8]="Division\n";p[9]="Telephone Number\n";p[10]="valid E-mail Address\n";p[11]="City\n";p[12]="State/Province\n";p[13]="Country\n"}else if(formId==5){p[6]="First Name\n";p[7]="Last Name\n";p[8]="Title\n";p[9]="Company Name\n";p[10]="Telephone Number\n";p[11]="valid E-mail Address\n";p[12]="State\n"}else if(formId==6){p[18]="Company\n";p[19]="Street\n";p[20]="City\n";p[21]="State/Province\n";p[22]="Zip/Postal Code\n";p[23]="Country\n";p[28]="Number of Sales, Support & Marketing Personnel\n";p[29]="Primary Area of Interest\n";p[30]="Current System\n";p[31]="First Name\n";p[32]="Last Name\n";p[33]="Title\n";p[34]="Telephone Number\n";p[37]="valid E-mail Address\n";p[41]="relationship with this referral\n";p[43]="CRM system being evaluated\n";p[45]="timeframe for CRM purchase\n";p[47]="top requirements\n";p[49]="other decision makers & influencers\n";p[51]="suggested next step\n";p[53]="how did you come in contact with this lead\n";p[55]="CRM needs of this lead\n"}else if(formId==7){p[3]="Company\n";p[4]="Street\n";p[5]="City\n";p[6]="Zip/Postal Code\n";p[7]="Country\n";p[8]="Industry\n";p[9]="Revenue\n";p[12]="First Name\n";p[131]="Last Name\n";p[15]="Telephone Number\n";p[16]="valid E-mail Address\n"}else if(formId==8){p[4]="Company\n";p[5]="Street\n";p[6]="City\n";p[7]="Postal Code\n";p[8]="Country\n";p[9]="Industry\n";p[10]="Number of Employees\n";p[13]="First Name\n";p[14]="Last Name\n";p[16]="Telephone Number\n";p[19]="valid E-mail Address\n"}else if(formId==9){p[3]="First Name\n";p[4]="Last Name\n";p[5]="Company Name\n";p[6]="Web Site URL\n";p[7]="Telephone Number\n";p[8]="valid E-mail Address\n";p[9]="Category\n";p[10]="Description\n"}else if(formId==10){p[2]="First Name\n";p[3]="Last Name\n";p[4]="Title\n";p[5]="Company Name\n";p[6]="Address\n";p[7]="Telephone Number\n";p[9]="valid E-mail Address\n"}else if(formId==11){p[5]="First Name\n";p[6]="Last Name\n";p[7]="Company Name\n";p[8]="Telephone Number\n";p[10]="Your Story\n"}else if(formId==12){p[7]="First Name\n";p[8]="Last Name\n";p[9]="Title\n";p[10]="Company Name\n";p[11]="Telephone Number\n";p[12]="valid E-mail Address\n"}else if(formId==13){p[7]="First Name\n";p[8]="Last Name\n";p[9]="Title\n";p[10]="Company Name\n";p[11]="Telephone Number\n";p[12]="valid E-mail Address\n";p[13]="City\n";p[14]="State\n";p[15]="Zip\n"}else if(formId==14){p[7]="First Name\n";p[8]="Last Name\n";p[9]="Title\n";p[10]="Company Name\n";p[11]="Telephone Number\n";p[12]="valid E-mail Address\n";p[13]="City\n";p[14]="Postal Code\n"}else if(formId==15){p[5]="First Name\n";p[6]="Last Name\n";p[7]="Job Title\n";p[8]="Company Name\n";p[9]="City\n";p[10]="Country\n";p[11]="Telephone Number\n";p[12]="valid E-mail Address\n"}else if(formId==16){p[7]="Priority\n";p[8]="Name\n";p[9]="Company Name\n";p[10]="valid E-mail Address\n";p[11]="Subject\n";p[12]="Comment\n"}else{alert("INTERNAL ERROR: No form ID passed. Please attempt this action at a later time.");return false}var errorMessage="Please fix the following errors: \n\n";var errorFound=0;var checkedFound=false;var count=1;for(i=0;i<p.length;i++){var error=false;if(p[i]!=null){var elem=document.forms[2].elements[i];if(elem.type=="text"||elem.type=="textarea"){if(p[i]=="valid E-mail Address\n"){if(!isValidEmail(elem.value)){error=true}}else if(elem.value.length==0){error=true}}else if(elem.type=="select-one"){if(elem.selectedIndex==0){error=true}}}if(error){errorFound=1;if(elem.type=="textarea"){errorMessage+="Please enter "}else if(elem.type=="select-one"){errorMessage+="Please select a "}else{errorMessage+="Please enter a "}errorMessage+=p[i]}}var checkFound=false;if(formId==2){for(i=27;i<32;i++){if(isChecked(document.forms[0].elements[i])){checkFound=true}}if(!checkFound){errorMessage+="Please select a Business Goal"}}if(errorFound==1){alert(errorMessage);return false}else{return true}}function isChecked(object){if(object.checked)return true;else return false}function billFormInit(){if(document.webtocase){var args=getArgs();var eml=args["eml"];document.webtocase.email.value=(eml!=null?eml:"");var nm=args["nm"];document.webtocase.first_name.value=(nm!=null?nm:"");var co=args["co"];document.webtocase.company.value=(co!=null?co:"")}}function getArgs(){var args=new Object();var query=location.search.substring(1);var pairs=query.split("&");for(var i=0;i<pairs.length;i++){var pos=pairs[i].indexOf('=');if(pos==-1)continue;var argname=pairs[i].substring(0,pos);var value=pairs[i].substring(pos+1);args[argname]=unescape(value)}return args}function setAppJSFlag(doc,jSparam){if(doc!=null&&jSparam!=null){doc.getElementById(jSparam).value=1}}function launchDemo(url){var winwidth=screen.width;var winheight=screen.height;var scroll="";if(winwidth>1000){winwidth=1020;winheight=700;scroll="no"}else if(winwidth<1000){winwidth=790;winheight=530;scroll="yes"}url=url+"&scroll="+scroll;newWindow=window.open(url,"Demo","toolbar=no,scrollbars=no,resizable=no,width="+winwidth+",height="+winheight+",left=0,top=0")}