/*@cc_on @*/
/*@if (@_win32 && @_jscript_version>=5)

function window.confirm(str)
{
    execScript('n = msgbox("'+str+'","4132", "Confirm")', "vbscript");
    return(n == 6);
}

@end @*/

var jIsSubmitting=false
var jUserID
var jUserName
var jUserLevel
var jUserAdminLevel
var jUserGroup
var jUserClientID
var jUserEmail

function jsForgotEmail() {
o=document.thisForm.emailforgot
if (o.value=="") { alert("Please enter an email address."); o.focus(); return; }
rv=isEmail(o);
if (rv!="") { alert(mBadEmail + ":" + o.name + ":" + rv); o.focus(); return; }
document.thisForm.submit()
}
function jsLogin(f,t,un,pw) {
f.hdnNextOp.value='LOGIN'
o=un
if (o.value=="") { alert("Please enter your user name."); o.focus(); return; }
f.hdnVal1.value=o.value
o=pw
if (o.value=="") { alert("Please enter a Password."); o.focus(); return; }
f.hdnVal2.value=o.value
f.submit()
}
function jsLoginX(un,pw) {
document.getElementById("hdnNextOp").value='LOGIN'
o=un
if (o.value=="") { alert("Please enter your user name."); o.focus(); return; }
o=pw
if (o.value=="") { alert("Please enter a Password."); o.focus(); return; }
document.forms["frmLogin"].submit()
}
function jsSideLogin(f,t,un,pw) {
o=un
if (o.value=="") { alert("Please enter an email address."); o.focus(); return; }
rv=isEmail(o);
if (rv!="") { alert(mBadEmail + ":" + o.name + ":" + rv); o.focus(); return; }
f.hdnVal1.value=o.value
o=pw
if (o.value=="") { alert("Please enter a Password."); o.focus(); return; }
f.hdnVal2.value=o.value
f.hdnNextOp.value='LOGIN'
f.submit()
}
function jsLoadSub(v) {
document.thisForm.SubscriptionID.value=v
}
function jsSubmitJoin(t) {
if (jIsSubmitting) { alert("We are in the process of submitting your transaction.  Please wait."); return 0; }
o=document.thisForm.SubscriptionID
if (o.value=="") { 
	alert("Please select a subscription");
	return
	}
o=document.thisForm.Address1
if (o.value=="") { alert("Please enter an address"); o.focus(); return }
o=document.thisForm.City
if (o.value=="") { alert("Please enter a city"); o.focus(); return }
o=document.thisForm.State
if (o.value=="") { alert("Please enter a state"); o.focus(); return }
o=document.thisForm.Postal
if (o.value=="") { alert("Please enter a Postal Code"); o.focus(); return }
o=document.thisForm.Country
if (o.value=="") { alert("Please enter a Country"); o.focus(); return }
o=document.thisForm.isAdmin
if (o.value!="ADMIN") {
	o=document.thisForm.ccType
	if (o.value=="") { alert("Please enter a Credit Card Type"); o.focus(); return }
	o=document.thisForm.ccNumber
	if (o.value=="") { alert("Please enter a Credit Card Number"); o.focus(); return }
	o=document.thisForm.ccMonth
	if (o.value=="") { alert("Please enter a Expiration Month"); o.focus(); return }
	o=document.thisForm.ccYear
	if (o.value=="") { alert("Please enter a Expiration Year"); o.focus(); return }
	}
o=document.thisForm.chkagreeToAbideByMarkLicense
if (!o.checked) { alert("You must agree to abide by the License Agreement relative to the use of the Collaborative Practice 'Mark'."); return; }
jIsSubmitting=true
document.thisForm.hdnSaveThis.value="SAVE"
document.thisForm.submit()
//rv=jsSaveFormRec(document.thisForm,this,'','')
}
function jsCheckRenew(t) {
if (jIsSubmitting) { alert("We are in the process of submitting your transaction.  Please wait."); return 0; }
o=document.thisForm.SubscriptionID
if (o.value=="") { 
	alert("Please select a subscription");
	return
	}
o=document.thisForm.Address1
if (o.value=="") { alert("Please enter an address"); o.focus(); return }
o=document.thisForm.City
if (o.value=="") { alert("Please enter a city"); o.focus(); return }
o=document.thisForm.State
if (o.value=="") { alert("Please enter a state"); o.focus(); return }
o=document.thisForm.Postal
if (o.value=="") { alert("Please enter a Postal Code"); o.focus(); return }
o=document.thisForm.Country
if (o.value=="") { alert("Please enter a Country"); o.focus(); return }
o=document.thisForm.isAdmin
if (o.value!="ADMIN") {
	o=document.thisForm.ccType
	if (o.value=="") { alert("Please enter a Credit Card Type"); o.focus(); return }
	o=document.thisForm.ccNumber
	if (o.value=="") { alert("Please enter a Credit Card Number"); o.focus(); return }
	o=document.thisForm.ccMonth
	if (o.value=="") { alert("Please enter a Expiration Month"); o.focus(); return }
	o=document.thisForm.ccYear
	if (o.value=="") { alert("Please enter a Expiration Year"); o.focus(); return }
	}
o=document.thisForm.chkagreeToAbideByMarkLicense
if (!o.checked) { alert("You must agree to abide by the License Agreement relative to the use of the Collaborative Practice 'Mark'."); return; }
jIsSubmitting=true
document.thisForm.hdnSaveThis.value="SAVEPAY"
document.thisForm.submit()
}
function jsJazzGoto(p) {
if (p=="ComingSoon") { window.location="_t.asp?T=ComingSoon" }
if (p=="ContactUs") { window.location="_t.asp?T=ContactUs&W=InfoContactUs" }

if (p=="Civil") { window.location="_Jazz-Home.asp" }

if (p=="Stories") { window.location="_t.asp?T=Stories" }

if (p=="PracticeGroups") { window.location="_t.asp?T=PracticeGroups&J=Y" }
if (p=="Books") { window.location="_t.asp?T=Books" }
if (p=="Articles") { window.location="_t.asp?T=Articles" }
if (p=="Videos") { window.location="_t.asp?T=Videos" }
if (p=="Links") { window.location="_t.asp?T=Links" }
if (p=="Links") { window.location="_t.asp?T=Links" }
if (p=="Periodicals") { window.location="_t.asp?T=Periodicals" }

if (p=="Login") { window.location="_pro.asp?T=Login" }

if (p=="CalendarPost") { window.location="_t.asp?T=CalendarPost" }
if (p=="Calendar") { window.location="_t.asp?T=Calendar" }
if (p=="MembershipRenewalAuth") { window.location="_t.asp?T=Calendar" }
if (p=="GiftMembership") { window.location="_t.asp?T=Calendar" }
if (p=="AddPracticeGroup") { window.location="_t.asp?T=GroupReg" }
if (p=="Forum") { window.location="_t.asp?T=Forum" }
if (p=="Ethics") { window.location="_t.asp?T=Ethics" }
if (p=="CivilCollab") { window.location="_t.asp?T=CivilCollab" }
if (p=="TrainersDir") { window.location="_t.asp?T=TrainersDir" }
if (p=="MemberFAQs") { window.location="_t.asp?T=MemberFAQs" }
if (p=="MembershipApp") { window.location="_reg.asp?M=" + jProLvl + "&MS=11" }

if (p=="PracticeToolsLib") { window.location="_t.asp?T=PracticeLibrary" }
if (p=="BooksPro") { window.location="_t.asp?T=BooksPro" }
if (p=="ArticlesForCivilPrac") { window.location="_t.asp?T=ARTSCIVILPRAC" }
if (p=="ArticlesPro") { window.location="_t.asp?T=ArticlesPro" }

if (p=="TrainersReg") { window.location="_t.asp?T=TrainersReg" }
if (p=="VideoLibrary") { window.location="_t.asp?T=ComingSoon" }
if (p=="WelcomeCenter") { window.location="_t.asp?T=WelcomeCenter" }
if (p=="Tip") { window.location="_mem.asp?T=Tip" }
if (p=="EthicsLib") { window.location="_t.asp?T=EthicsLib" }
if (p=="PublicEd") { window.location="_t.asp?T=PublicEd" }
if (p=="Review") { window.location="_t.asp?T=CollabReview" }
if (p=="Connection") { window.location="_t.asp?T=Connection" }
if (p=="Survey") { window.location="_t.asp?T=Survey" }
if (p=="Mentoring") { window.location="_t.asp?T=Mentoring" }
if (p=="MessageBoards") { window.location="_t.asp?T=MessageBoards" }

if (p=="UpdateProfile") { window.location="_memprofile.asp?M=" + jMemLvl + "&MS=22&MSS=2&T=Profile&S=Personal" }
if (p=="Profile-Personal") { window.location="_memprofile.asp?M=" + jMemLvl + "&MS=22&MSS=2&T=Profile&S=Personal" }
if (p=="Profile-Training") { window.location="_memprofile.asp?M=" + jMemLvl + "&MS=22&MSS=3&T=Profile&S=Training" }
if (p=="Profile-Education") { window.location="_memprofile.asp?M=" + jMemLvl + "&MS=22&MSS=4&T=Profile&S=Education" }
if (p=="Profile-Professional") { window.location="_memprofile.asp?M=" + jMemLvl + "&MS=22&MSS=5&T=Profile&S=Professional" }
if (p=="Profile-Account") { window.location="_memprofile.asp?M=" + jMemLvl + "&MS=22&MSS=6&T=Profile&S=Account" }

if (p=="WelcomeCenter") { window.location="_t.asp?T=WelcomeCenter" }

if (p=="GettingStarted") { window.location="_t.asp?T=GettingStarted" }
if (p=="GettingInvolved") { window.location="_t.asp?T=GettingInvolved" }
if (p=="WebTour") { window.location="_t.asp?T=WebTour" }
if (p=="Tools") { window.location="_t.asp?T=Tools" }

if (p=="Renew") { window.location=jIACPURL + "_ren.asp?S=RENEW&M=" + jMemLvl + "&MS=23" }
if (p=="AudioLibrary") { window.location="_t.asp?T=AudioLibrary" }

if (p=="SuggestionBox") { window.location="_t.asp?T=SuggestionBox" }
}
function jsEmailThisPage() {
document.frmPageInfo.hdnThisTitle.value=document.title;
document.frmPageInfo.hdnThisPage.value=window.location;
document.frmPageInfo.submit();
}
function jsFormLogin(f,t) {
o=f.MainUN
if (o.value=="") { alert("Please enter an valid username."); o.focus(); return; }
o=f.MainPW
if (o.value=="") { alert("Please enter a Password."); o.focus(); return; }
f.hdnNextOp.value='LOGIN'
f.submit()
}
function jsFormLoginRenew(f,t) {
o=f.MainUN
if (o.value=="") { alert("Please enter an valid username."); o.focus(); return; }
o=f.MainPW
if (o.value=="") { alert("Please enter a Password."); o.focus(); return; }
f.hdnNextOp.value='RENEW'
f.submit()
}
function jsLostPW(f) {
o=f.MainUN
if (o.value=="") { alert("Please enter an valid username and we will send your password to your registered email address."); o.focus(); return; }
f.hdnNextOp.value='FINDPW'
f.submit()
}
function jsRequestInfo(f,t) {
o=f.vInfoEmail
rv=isEmail(o);
if (rv!="") { alert(mBadEmail + ":" + o.name + ":" + rv); o.focus(); return; }
if (o.value=="") { alert("Please enter a valid email address."); o.focus(); event.preventDefault; return; }
o=f.vInfoCountry
if (o.value=="") { alert("Please select a valid Country."); o.focus(); return; }
if ((o.value!="Hong Kong") && (o.value!="Ireland")) {
	o=f.vInfoZip
	if (o.value=="") { alert("Please enter a valid Zip/Postal Code."); o.focus(); return; }
}
o=f.vInfoCountry
if (o.value=="") { alert("Please select a valid Country."); o.focus(); return; }
f.hdnNextOp.value='REQUESTINFO'
f.submit()
}
function jsSubmitEmail(f) {
o=f.RecipName
if (o.value=="") { alert("Please enter a Recipient name."); o.focus(); return; }
o=f.RecipEmail
if (o.value=="") { alert("Please enter an email for the recipient."); o.focus(); return; }
rv=isEmail(o);
if (rv!="") { alert(mBadEmail + ":" + o.name + ":" + rv); o.focus(); return; }
o=f.SenderName
if (o.value=="") { alert("Please enter your name."); o.focus(); return; }
o=f.SenderEmail
if (o.value=="") { alert("Please enter your email."); o.focus(); return; }
rv=isEmail(o);
if (rv!="") { alert(mBadEmail + ":" + o.name + ":" + rv); o.focus(); return; }
f.hdnSaveThis.value="SAVE"
f.submit()
}
function jsOpenLocate() {
vHeight=700
vWidth=850
vProps='resizable=yes,location=yes,menubar=yes,menu=yes,scrollbars=yes,height=' + vHeight + ',width=' + vWidth
vThisWin=window.open("http://www.collaborativepractice.com/_loc.asp",'View',vProps)
vThisWin.focus()
}
function jsSubmitSearch(si) {
document.forms("searchbox_008873985823673333676:tza5yk10keo").submit()
}
function jsCheckMember() {
document.thisForm.hdnNextOp.value="CHECKMEMBER"
document.thisForm.submit()
}
function jsShowMaintenance() {
alert('Sorry, but we are currently working on this function.  Please check back soon.')
}
function jsDoSort(sf,sd) {
document.thisForm.hdnSortFld.value=sf
document.thisForm.hdnSortDir.value=sd
document.thisForm.hdnNextOp.value="LIST"
document.thisForm.submit()
}
function InsertSampleMovie(path,file,w,h) {
if (file.indexOf('.swf') != -1) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + w + '" height="' + h + '">\n');
	document.write('<param name="movie" value="'  + path + file + '" />\n');
	document.write('<param name="quality" value="high"><param name="menu" value=true"><PARAM NAME="wmode" VALUE="transparent"> />\n');
	document.write('<embed src="'  + path + file + '" quality="high"  wmode="transparent" menu="true" pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + w + '" height="' + h + '"></embed>\n');
	document.write('</object>');
	return;
	}
if (file.indexOf('.wmv') != -1) {
	document.write('<EMBED src="' + file + '" width="320" height="240" autoplay="true" CONTROLLER="false" PLUGINSPAGE="http://www.apple.com/quicktime/download/"></EMBED>');
	return;
	}
var ua = navigator.userAgent.toLowerCase();
  if (ua.indexOf('safari') != - 1) { 
	document.write('<object classid="clsid: 02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="https://www.apple.com/qtactivex/qtplugin.cab" width="' + w + '" height="' + h + '">\n');
	document.write('<param name="src" value="'  + path + file + '" />\n');
	document.write('<param name="controller" value="true" />\n');
	document.write('</object>\n');

  } else 

	if (navigator.plugins && navigator.plugins.length) { // Not IE browser
		document.write(' <object type="video/quicktime" data="'  + path + file + '" width="' + w + '" height="' + h + ' class="mov">\n');
	    	document.write('<param name="controller" value="true" />\n');
		document.write('</object>\n');
	}

	else { // IE / PC browser
		document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="https://www.apple.com/qtactivex/qtplugin.cab" width="' + w + '" height="' + h + '">\n');
		document.write('<param name="src" value="'  + path + file + '" />\n');
		document.write('<param name="menu" value="true" />\n');
		document.write('<param name="controller" value="true" />\n');
 		document.write('</object>\n');
  }
	
}
function jsJumpToThis(t) {
if (t.value!="") {
	window.location="#" + t.value
	}
}
function jsEditMember(t) {
window.location="../intranet_main.asp?T=MEMBER&MID=" + t
}
function jsplay(v) {
document.frmVideo.SRC.value=v
document.frmVideo.submit()
}
function stateChanged()  { 
if (xmlHttp.readyState==4) { document.getElementById(jFld).value=xmlHttp.responseText; }
}
function GetXmlHttpObject() {
var xmlHttp=null;
try  {  // Internet Explorer
    		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
//    	xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
catch (e) { // Firefox, Opera 8.0+, Safari
	try {
  		xmlHttp=new XMLHttpRequest();
    		}
	catch (e) {
    		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    		}
  	}
return xmlHttp;
}
function jsLogDownload(lp) {
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null) {  alert ("Your browser does not support AJAX!");  return;  } 
var url="__GetData.asp";
url=url+"?ACT=ADD&SQL=KIT";
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
window.open(lp)
}
function jsChgClr(t,c) {
	t.style.color=c
}
function jsShowHideLogin(t) {
if (t.style.visibility=="visible") {
	t.style.visibility='hidden'
	}
else {
	t.style.visibility='visible'
	}
}
function jsMsg() {
alert(viewportheight)
//gotoThis("intranet_main.asp?T=SHOMNU")
}
function gotoThis(p) {
	alert(viewportheight)
}
function jsAddUp(t) {
	vComp=document.getElementById("nbrComputers").value
	if (vComp!="") {
		if (isNaN(parseInt(vComp))) { alert("Please enter only numbers."); event.returnValue=null; document.getElementById("nbrComputers").focus(); event.returnValue=null;return; }
	}
	vServ=document.getElementById("nbrServers").value
	vStaff=document.getElementById("nbrStaff").value
	if (vStaff!="") {
		if (isNaN(parseInt(vStaff))) { alert("Please enter only numbers."); event.returnValue=null; document.getElementById("nbrStaff").focus(); event.returnValue=null;return; }
	}
	vHourly=document.getElementById("StaffHrly").value
	vHourly=parseInt(vHourly)
	if ((vComp!="") && (vStaff!="")) {
		vComp=parseInt(vComp)
		vStaff=parseInt(vStaff)
		if ((vServ!="")) { 
			if (isNaN(parseInt(vServ))) { alert("Please enter only numbers."); event.returnValue=null; document.getElementById("nbrServers").focus(); event.returnValue=null;return; }
			vServ=parseInt(vServ)
			}

		//dcm

		vSetup=4995
		vServCost=0
		vCompCost=0
		//lookup price per desktop count
		if (vComp<1000) { vCompCost=7.2 }
		if ((vComp>=1000) && (vComp<5000)) { vCompCost=6.4 }
		if ((vComp>5000) && (vComp<15000)) { vCompCost=6 }
		if ((vComp>15000)) { vCompCost=3.2 }
		vCompCost=vComp*vCompCost
		vServCost=22*vServ

		//lookup size factor
		vSizeFactor=1
		if (vComp>=5000) { vSizeFactor=1.1 }
		if (vComp>99999) { vSizeFactor=1.15 }
			
		if (vHourly=="") { vHourly=45 }
		vLoaded=vHourly*1.2

		vStdRate=60
		vDiffStdLoaded=vLoaded/vStdRate

		vSTCost=vSetup+vCompCost+vServCost
		vSTFactor=3

		vDIYCost=vDiffStdLoaded*(vSTCost*vSTFactor)
		vDIYCost=vDIYCost*vSizeFactor
		
		vLoadedMth=((vLoaded*2002)/12)
		//*.25
		vClientTtlMths=vDIYCost/vLoadedMth
		vClientManMths=vClientTtlMths/vStaff
		
		vSTMthBilling=25000
		vSTMths=vSTCost/vSTMthBilling
		vSTStaff=vComp/10000
		vSTClientStaff=vLoadedMth*(vSTMths*vSTStaff)*.5
		vSTCost=vSTCost+vSTClientStaff
		vSavingsPct=(1-(vSTCost/vDIYCost))*100

		document.getElementById("divTitle").style.visibility="visible"
		document.getElementById("divFooter").style.visibility="visible"
		document.getElementById("DYI").style.visibility="visible"
		document.getElementById("DIYCost").innerHTML=formatCurrency(vDIYCost)
		document.getElementById("DIYTime").innerHTML=FormatNumber(vClientManMths,1,false,false,false) + " month(s)"
		document.getElementById("sUs").style.visibility="visible"
		document.getElementById("OurCost").innerHTML=formatCurrency(vSTCost)
		document.getElementById("OurTime").innerHTML=FormatNumber(vSTMths,1,true,false,false) + " month(s)"

		vSavingsCost=vDIYCost-vSTCost
		vSavingsTime=vClientManMths-vSTMths
		document.getElementById("Svg").style.visibility="visible"
		document.getElementById("SvgPct").style.visibility="visible"
		document.getElementById("SaveCost").innerHTML="<b>" + formatCurrency(vSavingsCost)
		document.getElementById("SaveTime").innerHTML="<b>" + FormatNumber(vSavingsTime,1,false,false,false) + " month(s)"
		document.getElementById("SavePct").innerHTML="<b>&nbsp;&nbsp;" + FormatNumber(vSavingsPct,0,false,false,false) + "%"

		//vCostFines=.75*(vComp*100)
		
		//document.getElementById("Assmpts").style.visibility="visible"
		//document.getElementById("avgAR").innerHTML="Average number of Add/Remove Programs per system: <b>" + FormatNumber(parseInt(vARPs),1,false,false,true) + "</b>"
		//document.getElementById("totAR").innerHTML="Total Add/Remove Programs in environment: <b>" + FormatNumber(parseInt(vARPDataVol),1,false,false,true) + "</b>"
		//document.getElementById("unqAR").innerHTML="Unique Add/Remove Programs: <b>" + FormatNumber(parseInt(vARPUniqueRecs),1,false,false,true) + "</b>"
		//document.getElementById("avgFile").innerHTML="Average number of EXE files per system: <b>" + FormatNumber(parseInt(vFiles),1,false,false,true) + "</b>"
		//document.getElementById("totFile").innerHTML="Total EXE files in environment: <b>" + FormatNumber(parseInt(vFileDataVol),1,false,false,true) + "</b>"
		//document.getElementById("unqFile").innerHTML="Unique EXE files: <b>" + FormatNumber(parseInt(vFileUniqueRecs),1,false,false,true) + "</b>"
		//document.getElementById("orfFile").innerHTML="Orphan EXE files: <b>" + FormatNumber(parseInt(vFileOrphanRecs),1,false,false,true) + "</b>"
		//document.getElementById("Loaded").innerHTML="Staff hourly rate ($" + vHourly + " per hour plus a 20% load factor): <b>" + formatCurrency(vLoaded) + "</b>"


		vARPs=150
		vFiles=1500
		vUnique=.10
		vFileOrphans=.01
		vFilesPctIDd=.2
		
		vARPDataVol=(vComp)*vARPs
		vARPUniqueRecs=vARPDataVol*vUnique
		vARPDataNormalizationMinutesPer=.5
		vARPDataNormalization=vARPDataNormalizationMinutesPer*vARPUniqueRecs
		vARPRecIDRate=2.5
		vARPRecID=vARPRecIDRate*vARPUniqueRecs
		vARPTtlHrs=(vARPDataNormalization+vARPRecID)/60
		
		vFileDataVol=(vComp)*vFiles
		vFileUniqueRecs=vFileDataVol*vUnique*vFilesPctIDd
		vFileOrphanRecs=vFileUniqueRecs*vFileOrphans
		vFileAnalysisMinutesPer=.5
		vFileAnalysis=vFileAnalysisMinutesPer*vFileUniqueRecs
		vFileOrphanAnalysisMinutesPer=10
		vFileOrphanAnalysis=vFileOrphanAnalysisMinutesPer*vFileOrphanRecs
		vFileRecIDTime=vFileUniqueRecs*3
		vFileTtlHrs=(vFileAnalysis+vFileOrphanAnalysis+vFileRecIDTime)/60
		vTtlHrs=vFileTtlHrs

		vStaffMths=(vTtlHrs/(2002/12)/vStaff)
		vStaffCost=vTtlHrs*vLoaded
		vDIYCost=vStaffCost

		vSTAnalysisPerMth=20000
		vSTMths=vUnique/vSTAnalysisPerMth
		vSTMths=vFileUniqueRecs/vSTAnalysisPerMth
		
		vSTRate=78
		vSTRate=65
		
		vSTFTE=vSTMths*((vSTRate*2002)/12)
		vSTCost=((vSTRate*2002)/12)*vSTMths
		vSTCost=vCompCost+vServCost+vSetup+vSTFTE
	}
}
function jsReportIACP(r) {
parent.textFrame.location="intranet_main.asp?T=" + r + "&SD=" + document.getElementById("txtStartDate").value  + "&ED=" + document.getElementById("txtEndDate").value 
}
function jsShowMember(t) {
parent.textFrame.location="intranet_main.asp?T=MEMBER&MID=" + t.value
}
function jaMakeTable() {
document.thisForm.hdnNextOp.value="MAKETABLE"
document.thisForm.submit()
}
function jsEditGroup(t) {
window.location="system/sysDBMS.asp?MAINMENU=Y&TBL=tblGroups&FEXC=NO&FFLD=NONE&FVAL=N&SFLD=NONE&MODE=EDIT&ID=" + t.value
}
function jsEditSubs(t) {
window.location="system/sysDBMS.asp?MAINMENU=Y&TBL=tblMemSubscriptions&FEXC=NO&FFLD=NONE&FVAL=N&SFLD=NONE&MODE=EDIT&ID=" + t.value
}
function jsRefreshPage(cid) {
window.opener.location="intranet_main.asp?T=MEMBER&MID=" + cid
}
function jsEditNote(id) {
n="EDIT"
w="intranet_main.asp?T=CONTACTNOTES&EDIT=Y&ID=" + id
rv=jsOpenSmallWin(n,w)
}
function jsAddNote(t) {
n=""
w="intranet_main.asp?T=CONTACTNOTES&MID=" + t
rv=jsOpenSmallWin(n,w)
}
function jsPW(t,un,pw) {
if (t.value==un) {
	document.getElementById("UserPW").value=pw
	}
}
function jsSaveUserRec() {
e=document.thisForm.UserName; if (e.value=="") { alertm("",e); return }; if (e.value=="NEW") { alertm("Please provide a valid User Name.",e); return };
e=document.thisForm.Phone; 
if (e.value!="") { rv=isPhone(e); if (rv!="") { alertm("Please provide a valid phone.  " + rv,e); return } }
e=document.thisForm.Email; if (e.value=="") { alertm("",e); return };
rv=isEmail(e); if (rv!="") { alertm("Please provide a valid email address.  " + rv,e); return }
e=document.thisForm.ConfirmEmail; if (e.value=="") { alertm("",e); return };
rv=isEmail(e); if (rv!="") { alertm("Please provide a valid email address.  " + rv,e); return }
if (e.value!=document.thisForm.Email.value) { alertm("Your email and your confirm email values do not match.",e); return }
e=document.thisForm.UserPW; if (e.value=="") { alertm("",e); return };
e=document.thisForm.ConfirmPW; if (e.value=="") { alertm("",e); return };
if (e.value!=document.thisForm.UserPW.value)  { alertm("Your password and your confirm password values do not match.",e); return }
document.thisForm.hdnNextMode.value="SAVE";
document.thisForm.submit();
}
function jsForgotPW() {
jUN=document.thisForm.Email;
if (jUN.value=="") { alert("Please enter an Email Address"); jUN.focus(); return; }
rv=isEmail(jUN)
if (rv!="") { alert("Please enter a valid Email Address " + rv); jUN.focus(); return; }
document.thisForm.hdnNextOp.value="SENDPW"
document.thisForm.submit();
}
function jsRegister() {
document.thisForm.hdnNextOp.value="REGISTER"
document.thisForm.submit();
}
function openCombobox1() { cbo1.open() } 
function getWordDescription1() { var sWord = cbo1.getText();ob_post.AddParam("sWord", sWord);    }

function openCombobox2() { cbo2.open() } 
function getWordDescription2() { var sWord = cbo2.getText();ob_post.AddParam("sWord", sWord);    }

function openCombobox3() { cbo3.open() } 
function getWordDescription3() { var sWord = cbo3.getText();ob_post.AddParam("sWord", sWord);    }

function openCombobox4() { cbo4.open() } 
function getWordDescription4() { var sWord = cbo4.getText();ob_post.AddParam("sWord", sWord);    }

function openCombobox5() { cbo5.open() } 
function getWordDescription5() { var sWord = cbo5.getText();ob_post.AddParam("sWord", sWord);    }

function openCombobox6() { cbo6.open() } 
function getWordDescription6() { var sWord = cbo6.getText();ob_post.AddParam("sWord", sWord);    }

function openCombobox7() { cbo7.open() } 
function getWordDescription7() { var sWord = cbo7.getText();ob_post.AddParam("sWord", sWord);    }

function openCombobox8() { cbo8.open() } 
function getWordDescription8() { var sWord = cbo8.getText();ob_post.AddParam("sWord", sWord);    }

function openCombobox9() { cbo9.open() } 
function getWordDescription9() { var sWord = cbo9.getText();ob_post.AddParam("sWord", sWord);    }

function openCombobox10() { cbo10.open() } 
function getWordDescription10() { var sWord = cbo10.getText();ob_post.AddParam("sWord", sWord);    }

function loadWordDescription(sWordDescription) {
	document.getElementById("divWordInformation").innerHTML = "<span class='tdText' style='white-space: wrap;width:325px;'><b>" + cbo1.getText() + "</b><br /><br /><br />" + sWordDescription.replace(/\n/g, "<br />").replace(/\r\n/g, "<br />") + "</span>";        
	}            
function jsGoogle(q) {
	jsOpenMedWin("http://www.google.com/search?q=" + q)
}
function jsBing(q) {
	jsOpenMedWin("http://www.bing.com/search?q=" + q)
}
function jsChkMT(o) {
if (o.value=="") { alert(o.name + " requires a value."); o.focus; return false; } else { return true }
}
function jsPickClient() {
document.forms[0].submit()
}
function jsPickProject() {
document.forms[0].submit()	
}
function jsRunReport() {
if (!jsChkMT(document.thisForm.cmbProject)) { return false }
document.thisForm.submit()	
}
function jsPDF() {
document.thisForm.hdnNextOp.value="PDF";
document.thisForm.submit()	
}
function jsCallAliases() {
jCID=document.thisForm.cmbClient.value
jSRC=document.thisForm.txtSearch.value
if (jSRC=='') { jSRC="%" }
jMAX=document.thisForm.txtMaxAppr.value
jSHO=1
jUSR=document.thisForm.hdnUserID.value
//alert("MainGrid.aspx?RL=Y&RS=alias_List&KF=idAlias&P1=" + jCID + "&P2=" + jSRC + "&P3=" + jMAX + "&P4=" + jUSR)
top["textFrame"].location.href="MainGrid.aspx?RL=Y&RS=alias_List&PT=Aliases&KF=idAlias&P1=" + jCID + "&P2=" + jSRC + "&P3=" + jMAX + "&P4=" + jUSR
}
function jsCallPubs() {
jCID=document.thisForm.cmbClient.value
if (jCID=='') { jCID=0 }
jPID=document.thisForm.cmbProject.value
if (jPID=='') { jPID=0 }
jSRC=document.thisForm.txtSearch.value
if (jSRC=='') { jSRC="%" }
jMAX=document.thisForm.txtMaxAppr.value
jUSR=document.thisForm.hdnUserID.value
top["textFrame"].location.href="MainGrid.aspx?RL=Y&RS=publisher_List&PT=Publishers&KF=idPublisher&P1=" + jCID + "&P2=" + jPID + "&P3=" + jSRC + "&P4=" + jMAX + "&P5=" + jUSR
}
function jsCallApps() {
jCID=document.thisForm.cmbClient.value
if (jCID=='') { jCID=0 }
jPID=document.thisForm.cmbProject.value
if (jPID=='') { jPID=0 }
jSRC=document.thisForm.txtSearch.value
if (jSRC=='') { jSRC="%" }
jMAX=document.thisForm.txtMaxAppr.value
jUSR=document.thisForm.hdnUserID.value
top["textFrame"].location.href="MainGrid.aspx?RL=Y&RS=application_List&PT=Applications&KF=idApplication&P1=" + jSRC + "&P2=" + jMAX + "&P3=" + jUSR
}
function jsCallARP() {
jCID=document.thisForm.cmbClient.value
if (jCID=='') { jCID=0 }
jPID=document.thisForm.cmbProject.value
if (jPID=='') { jPID=0 }
jSRC=document.thisForm.txtSearch.value
if (jSRC=='') { jSRC="%" }
jMAX=document.thisForm.txtMaxAppr.value
jSHO=1
jUSR=document.thisForm.hdnUserID.value
top["textFrame"].location="MainGrid.aspx?RL=Y&RS=arp_List&PT=ARP&KF=idImported&P1=" + jCID + "&P2=" + jPID + "&P3=" + jSRC + "&P4=" + jMAX + "&P5=" + jUSR
}
function jsCallARP2() {
jCID=document.thisForm.cmbClient.value
if (jCID=='') { jCID=0 }
jPID=document.thisForm.cmbProject.value
if (jPID=='') { jPID=0 }
jSRC=document.thisForm.txtSearch.value
if (jSRC=='') { jSRC="%" }
jMAX=document.thisForm.txtMaxAppr.value
jSHO=1
jUSR=document.thisForm.hdnUserID.value
top["textFrame"].location="MainGrid.aspx?RL=Y&RS=arp_List&TT=ARP2&PT=ARP&KF=idImported&P1=" + jCID + "&P2=" + jPID + "&P3=" + jSRC + "&P4=" + jMAX + "&P5=" + jUSR
}
function jsCallARPForm() {
jCID=document.thisForm.cmbClient.value
if (jCID=='') { jCID=0 }
jPID=document.thisForm.cmbProject.value
if (jPID=='') { jPID=0 }
jSRC=document.thisForm.txtSearch.value
if (jSRC=='') { jSRC="%" }
jMAX=document.thisForm.txtMaxApprLvl.value
jUSR=document.thisForm.hdnUserID.value
document.thisForm.hdnRL.value="Y"
document.thisForm.hdnRS.value="arp_list"
document.thisForm.hdnKF.value="idImported"
document.thisForm.hdnP1.value=jCID
document.thisForm.hdnP2.value=jPID
document.thisForm.hdnP3.value=jSRC
document.thisForm.hdnP4.value=jMAX
document.thisForm.hdnP5.value=jUSR
document.thisForm.submit()
}
function jsCallFiles() {
jCID=document.thisForm.cmbClient.value
if (jCID=='') { jCID=0 }
jPID=document.thisForm.cmbProject.value
if (jPID=='') { jPID=0 }
jSRC=document.thisForm.txtSearch.value
if (jSRC=='') { jSRC="%" }
jMAX=document.thisForm.txtMaxAppr.value
jSHO=1
jUSR=document.thisForm.hdnUserID.value
//alert("MainGrid.aspx?RL=Y&RS=file_List&KF=idImported&P1=" + jCID + "&P2=" + jPID + "&P3=" + jSRC + "&P4=" + jMAX + "&P5=" + jUSR)
top["textFrame"].location.href="MainGrid.aspx?RL=Y&RS=file_List&PT=Files&KF=idImported&P1=" + jCID + "&P2=" + jPID + "&P3=" + jSRC + "&P4=" + jMAX + "&P5=" + jUSR
}
function decode(str) {
var result = "";
for (var i = 0; i < str.length; i++) {
	if (str.charAt(i) == "+") {
  		result += " ";
  		}
  	else {
	  	result += str.charAt(i);
		}
	}
return unescape(result);
}
function jsClearCrit(jLvl) {
f=document.thisForm;
f.txtMaxAppr.value=jLvl;
f.txtSearch.value='';
f.cmbProject.value='';
}
function jsRecalcStats() {
	document.thisForm.hdnNextOp.value="RECALCSTATS"
	document.thisForm.submit()
}

var jsTblName;
var jsAttachTo;
var jClientText="";
var jProjectText="";
var jMaxApprText="";
var jCurrentOp="Edit"

function OnDelete(record) {
	//grid1.refresh()
}
function jsChgPubInfoID(jSQL,jID) {
rv=ob_post.post(null, "vbSQLSP");

jsAjaxData(jID,jSQL,'publisherName','publisherWebSite')
if ((frames.iFrameFly.document.getElementById("publisherWebSite").value!='') && (frames.iFrameFly.document.getElementById("publisherWebSite").value!='n/a')) { frames.iFrameFly.document.getElementById("btnPubWebSite").disabled=false } else  { frames.iFrameFly.document.getElementById("btnPubWebSite").disabled=true }
}
function zjsCheckAppPub(jPubID,jAppName,jFlds) {
//for (i in jFlds) { alert(jFlds[i]) }
jSQL="publisherAppName_Search"
jParam="vKeyFld=idPublisher|vMainID=" + jPubID.value + "|vKeyFld2=appName|vMainID2=" + jAppName.value
ob_post.AddParam("vSQL", jSQL); 
ob_post.AddParam("vParam", jParam); 
rv=ob_post.post(null, "vbSQLSP");
try {
    o=frames.iFrameFly.document
    isFrame=true;
    }
catch(e) {
    o=document
    }
for (i in rv) { 
	//alert(frames.iFrameFly.document.getElementById(jFlds[i]).value)
	if (o.getElementById(jFlds[i])) { o.getElementById(jFlds[i]).value=rv[i] }
	}
}
function jsAjaxData(jID,jSQL,jCtrl1,jCtrl2) {
ob_post.AddParam ("vID", jID); 
jSQL=decode(jSQL)
ob_post.AddParam ("vSQL", jSQL); 
rv=ob_post.post(null, "vbGetSQLData");
if (jCtrl1!="") { frames.iFrameFly.document.getElementById(jCtrl1).value=rv[0] }
if (jCtrl2!="") { frames.iFrameFly.document.getElementById(jCtrl2).value=rv[1] }
}
function jsAlert(s) {
windowalert(s,'Information','error');
}
function jsAliases() {
jCID=document.getElementById("txtClientID").value
jPID=document.getElementById("txtProjectID").value
jSRC=document.getElementById("txtSearch").value
if (jSRC=='') { jSRC="M%" }
jMAX=document.getElementById("txtMaxApprLvl").value
jSHO=1
jUSR=document.getElementById("txtUserID").value
s="MainGrid.aspx?RL=Y&RS=alias_List&KF=idAlias&P1=" + jCID + "&P2=" + jSRC + "&P3=" + jMAX + "&P4=" + jSHO + "&P5=" + jUSR + "&CID=" + jCID + "&PID=" + jPID + "&MAX=" + jMAX + "&SRC=" + jSRC + "&TTL=ALIASES"
window.location=s
}
function jsPublishers() {
jCID=document.getElementById("txtClientID").value
jPID=document.getElementById("txtProjectID").value
jSRC=document.getElementById("txtSearch").value
if (jSRC=='') { jSRC="M%" }
jMAX=document.getElementById("txtMaxApprLvl").value
jSHO=1
jUSR=document.getElementById("txtUserID").value
s="MainGrid.aspx?RL=Y&RS=publisher_Maint&KF=idPublisher&P1=" + jSRC + "&CID=" + jCID + "&PID=" + jPID + "&MAX=" + jMAX + "&SRC=" + jSRC + "&TTL=PUBS"
window.location=s
}
function jsARPs() {
jCID=document.getElementById("txtClientID").value
jPID=document.getElementById("txtProjectID").value
jSRC=document.getElementById("txtSearch").value
if (jSRC=='') { jSRC="%" }
jMAX=document.getElementById("txtMaxApprLvl").value
jSHO=1
jUSR=document.getElementById("txtUserID").value
s="MainGrid.aspx?RL=Y&RS=arp_List&KF=idImported&P1=" + jCID + "&P2=" + jPID + "&P3=" + jSRC + "&P4=" + jMAX + "&P5=" + jUSR + "&CID=" + jCID + "&PID=" + jPID + "&MAX=" + jMAX + "&SRC=" + jSRC + "&TTL=ARP"
window.location=s
}
function jsFiles() {
jCID=document.getElementById("txtClientID").value
jPID=document.getElementById("txtProjectID").value
jSRC=document.getElementById("txtSearch").value
if (jSRC=='') { jSRC="%" }
jMAX=document.getElementById("txtMaxApprLvl").value
jSHO=1
jUSR=document.getElementById("txtUserID").value
s="MainGrid.aspx?RL=Y&RS=file_List&KF=idImported&P1=" + jCID + "&P2=" + jPID + "&P3=" + jSRC + "&P4=" + jSHO + "&P5=" + jUSR + "&CID=" + jCID + "&PID=" + jPID + "&MAX=" + jMAX + "&SRC=" + jSRC + "&TTL=FILES"
window.location=s
}
function jsChgPubInfoName(v,jTyp) {
jsGetSQLData('publisherName','publisherName',v,'str','idPublisher','idPublisher')
o=frames.iFrameFly.document
v=o.getElementById('idPublisher').value
jsGetSQLData('publisher','idPublisher',v,'int','webSite','publisherWebSite')
}
function jsGetSQLData(jRS,jIDFld,jID,jTyp,jFld,jCtrl) {
ob_post.AddParam ("vRS", jRS); 
ob_post.AddParam ("vIDFld", jIDFld); 
ob_post.AddParam ("vID", jID); 
ob_post.AddParam ("vTyp", jTyp); 
ob_post.AddParam ("vFld", jFld); 
rv=ob_post.post(null, "vbGetData");
o=frames.iFrameFly.document
if (rv!=undefined) { o.getElementById(jCtrl).value=rv } else { alert("Could not find a match.") }
}
function stopEventPropagation(e) {
	if(!e){e=window.event;}
	if(!e){return false;}
	e.cancelBubble=true;
	if(e.stopPropagation){e.stopPropagation();}
	}
function zjsSelectReport(t,e) {
	alert(t.contentCell.innerHTML)
	}
function jsSelectExport(t,e) {
	alert(t.contentCell.innerHTML)
	}
function jsSelectClient(t,e) {
	v=t.contentCell.innerHTML
	s=e.innerHTML
	jNewClientText="Client: " + v
	if (jClientText!="") {
		s=s.replace(jClientText, jNewClientText);
		}
	else	{
		s=s.replace("Select Client", jNewClientText);
		}
	jClientText=jNewClientText
	e.innerHTML=s
	s="select idClient from client where name=^zzID^"
	rv=jsAjaxData(v,s,document.getElementById("txtClientID"),"")
	}
function jsSelectProject(t,e) {
	v=t.contentCell.innerHTML
	s=e.innerHTML
	jNewProjectText="Project: " + v
	if (jProjectText!="") {
		s=s.replace(jProjectText, jNewProjectText);
		}
	else	{
		s=s.replace("Select Project", jNewProjectText);
		}
	jProjectText=jNewProjectText
	e.innerHTML=s
	s="select idProject from project where name=^zzID^"
	rv=jsAjaxData(v,s,document.getElementById("txtProjectID"),"")
	}
function jsSelectMaxApprLvl(t,e) {
	v=t.contentCell.innerHTML
	s=e.innerHTML
	jNewMaxApprText="Approval Level: " + v
	if (jMaxApprText!="") {
		s=s.replace(jMaxApprText, jNewMaxApprText);
		}
	else	{
		s=s.replace("Max Approval Level", jNewMaxApprText);
		}
	jMaxApprText=jNewMaxApprText
	e.innerHTML=s
	s="select ApprovalLevel from tlkApprovalLevels where ApprovalLevelDesc=^zzID^"
	rv=jsAjaxData(v,s,document.getElementById("txtMaxApprLvl"),"")
	}
function jsCallPage(t) {
    window.location="?T=" + (t.contentCell.innerHTML)
    }
function exportToWord() {
    window.location="?OP=Word_Export"
	}
function printGrid() {
    grid1.print();
    }	    
function jsCopyRecs(t) {
	}
function jsDeleteRecs(t) {
	if (confirm("Delete the selected records?")) {
		alert("Alright, you asked for it")
		}
	}
function jsSetLevels() {
    try {
        o=frames.iFrameFly.document
        isFrame=true;
        }
    catch(e) {
        o=document
        }
    jDoAppLevels=true
    if (o.getElementById("pageType")) { if (o.getElementById("pageType").value=="PUBLISHER_LIST") { jDoAppLevels=false } }
    if (jDoAppLevels) {
		if (o.getElementById("appLastUserNameToIncrementApprovalLevel")) { o.getElementById("appLastUserNameToIncrementApprovalLevel").value="" }
		var jImpAppr=0; jAppAppr=0;
		if (o.getElementById("impApprovalLevel")) { jImpAppr=parseInt(o.getElementById("impApprovalLevel").value); }
		if (o.getElementById("appApprovalLevel")) { jAppAppr=parseInt(o.getElementById("appApprovalLevel").value); }
		if (jAppAppr>jUserAdminLevel) { 
			if (o.getElementById("idPublisher")) { o.getElementById("idPublisher").disabled=true }
			if (o.getElementById("publisherName")) { o.getElementById("publisherName").disabled=true }
			if (o.getElementById("idApplicationType")) { o.getElementById("idApplicationType").disabled=true }
			if (o.getElementById("idLicenseType")) { o.getElementById("idLicenseType").disabled=true }
			if (o.getElementById("idCategory")) { o.getElementById("idCategory").disabled=true }
			if (o.getElementById("appName")) { o.getElementById("appName").disabled=true }
			}
		if (jImpAppr>jUserAdminLevel) { 
			if (o.getElementById("majorVersion")) { o.getElementById("majorVersion").disabled=true }
			if (o.getElementById("releaseVersion")) { o.getElementById("releaseVersion").disabled=true }
			}
	    var jDisabled=false;
		if (o.getElementById("AL")) { 
			//o.getElementById("AL").value=jAppAppr
			//if (jImpAppr<jAppAppr) { o.getElementById("AL").value=jImpAppr }
			var oimp=0; oapp=0;
			if (o.getElementById("impLastIdUserToIncrementApprovalLevel")) { oimp=o.getElementById("impLastIdUserToIncrementApprovalLevel").value; }
			if (o.getElementById("appLastIdUserToIncrementApprovalLevel")) { oapp=o.getElementById("appLastIdUserToIncrementApprovalLevel").value }
			if (parseInt(o.getElementById("AL").value)>=jUserAdminLevel) { 
				jDisabled=true 
				} 
			else if ((jUserID==oimp) || (jUserID==oapp)) { 
				jDisabled=true 
				} 
			}
		}
	jUserLevel=getCookie("vUserLevel")
	if (jUserLevel.indexOf("ADMIN")>-1) { jDisabled=false; } 
	if (o.getElementById("btnIncrementLevel")) { o.getElementById("btnIncrementLevel").disabled=jDisabled }
}
function randomString() {
	var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
	var string_length = 8;
	var randomstring = '';
	for (var i=0; i<string_length; i++) {
		var rnum = Math.floor(Math.random() * chars.length);
		randomstring += chars.substring(rnum,rnum+1);
	}
	return randomstring;
}
function jsValChecks(f) {
for (eli=0;eli<f.elements.length;eli++) { 
	var e=f.elements[eli]
	if ((!e.alt=="") || (!e.dataFld=="")) { 
		vc=e.dataFld
		if (vc==undefined) { vc=e.alt }
		vv=e.value
		vn=e.name
		if (vn.substr(0,4)=="DOM_") { vn=vn.substr(4) }
		if ((vv=="") && (vc.indexOf("VC_REQUIRED")>-1)) { 
			alert("Sorry.  " + vn + " requires a value."); e.focus(); return false;
			}
		if ((vv!="") && (vc.indexOf("VC_NUMBER")>-1)) { 
			rv=isNumber(e.value);
			if (rv!="") { alert(mBadNumber + ":" + e.name + ":" + rv); e.focus(); return false; }
			e.value=MakeNumber(e)
			}
		if ((vv!="") && (vc.indexOf("VC_CURRENCY")>-1)) { 
			rv=isCurrency(e.value);
			if (rv!="") { alert(mBadCurrency + ":" + e.name + ":" + rv); e.focus(); return false; }
			e.value=MakeNumber(e)
			}
		if ((vv!="") && (vc.indexOf("VC_DATE")>-1)) { 
			rv=couldBeDate(e.value);
			if (rv!="") { alert(mBadDate + ":" + e.name + ":" + rv); e.focus(); return false; }
			}
		if ((vv!="") && (vc.indexOf("VC_ZIP")>-1)) { 
			rv=isZip(e);
			if (rv!="") { alert(mBadZip + ":" + e.name + ":" + rv); e.focus(); return false; }
			}
		if ((vv!="") && (vc.indexOf("VC_PHONE")>-1)) { 
			rv=isPhone(e);
			if (rv!="") { alert(mBadPhone + ":" + e.name + ":" + rv); e.focus(); return false; }
			}
		if ((vv!="") && (vc.indexOf("VC_EMAIL")>-1)) { 
			rv=isEmail(e);
			if (rv!="") { alert(mBadEmail + ":" + e.name + ":" + rv); e.focus(); return false; }
			}
		if ((vv!="") && (vc.indexOf("VC_URL")>-1)) { 
			rv=isURL(e);
			if (rv!="") { alert(mBadURL + ":" + e.name + ":" + rv); e.focus(); return false; }
			}
		if ( (vv!="") && (vc.indexOf("VC_STRIPQUOTES")>-1) ) { 
			v=e.value;
			x=""
			for (iz=0;iz<v.length;iz++) {
				if ((v.charCodeAt(iz)!=34) && (v.charCodeAt(iz)!=39)) { x=x + v.charAt(iz) }
				}
			e.value=x;
			}
		}
	}
f.submit();
return true
}
function jsSaveRec(f,vSP) {
var flds="";
var vals="";
for (eli=0;eli<f.elements.length;eli++) { 
	if (f.elements[eli].name!="") {
		flds=flds + "'" + f.elements[eli].name + "',"
		vals=vals + "'" + f.elements[eli].value + "',"
		}
	}
flds=flds.substr(0,flds.length-1)+""
vals=vals.substr(0,vals.length-1)+""
ob_post.AddParam("vRS",vSP);
ob_post.AddParam("vFlds",flds);
ob_post.AddParam("vVals",vals);
ob_post.post(null, "vbSaveRecordFromArrays")
return true;
}
function getCookie(c_name) {
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}
function jsLoadProjects(jClientID) {
if (document.getElementById("cmbProject")) {
	ob_post.AddParam("vSQL", "spGetProjects"); 
	ob_post.AddParam("vP1",jClientID);
	rv=ob_post.post(null, "vbSQLSP");
	var vals = new Array()
	var txts = new Array()
	ct=0
	o=document.getElementById("cmbProject")
	o.options.length=1
	for (i in rv) { 
		vals[i]=rv[i]; 
		}
	ct=i
	for (i=0;i<=ct;i++) {
		var oOption = document.createElement("OPTION"); 
		x=(i%2)
		if (x==1) { 
			oOption.text=vals[i];
			oOption.value=vals[i-1];
			o.add(oOption); 	
			}
		}
	}
if (document.getElementById("lstValidators")) {
	ob_post.AddParam("vSQL", "spGetValidators"); 
	ob_post.AddParam("vP1",jClientID);
	rv=ob_post.post(null, "vbSQLSP");
	var vals = new Array()
	var txts = new Array()
	ct=0
	o=document.getElementById("lstValidators")
	o.options.length=1
	for (i in rv) { 
		vals[i]=rv[i]; 
		}
	ct=i
	for (i=0;i<=ct;i++) {
		var oOption = document.createElement("OPTION"); 
		x=(i%2)
		if (x==1) { 
			oOption.text=vals[i];
			oOption.value=vals[i-1];
			o.add(oOption); 	
			}
		}
	}
}
function formatDate(dt) {
return dt.getMonth()+1 + "/" + dt.getDate() + "/" + dt.getYear();
}
function jsCallARPTab(itemID) {
ob_em_SelectItem(itemID);
jsGetVals();
document.getElementById('tabIframe').src="MainGrid.aspx?RL=Y&RS=arp_List&TT=ARP2&KF=idImported&P1=" + jCID + "&P2=" + jPID + "&P3=" + jSRC + "&P4=" + jMAX + "&P5=" + jUSR + "&WNM=" + jWindowName
}
function jsCallAliasesTab(itemID) {
ob_em_SelectItem(itemID);
jsGetVals();
document.getElementById('tabIframe').src="MainGrid.aspx?RL=Y&RS=alias_List&PT=Aliases&KF=idAlias&P1=" + jCID + "&P2=" + jSRC + "&P3=" + jMAX + "&P4=" + jUSR + "&WNM=" + jWindowName
}
function jsCallPubsTab(itemID) {
ob_em_SelectItem(itemID);
jsGetVals();
document.getElementById('tabIframe').src="MainGrid.aspx?RL=Y&RS=publisher_List&PT=Publishers&KF=idPublisher&P1=" + jCID + "&P2=" + jPID + "&P3=" + jSRC + "&P4=" + jMAX + "&P5=" + jUSR + "&WNM=" + jWindowName
}
function jsCallAppsTab(itemID) {
ob_em_SelectItem(itemID);
jsGetVals();
//document.getElementById('tabIframe').src="MainGrid.aspx?RL=Y&RS=application_List&PT=Applications&KF=idApplication&WNM=" + jWindowName + "&P1=" + jSRC + "&P2=" + jMAX + "&P3=" + jUSR
document.getElementById('tabIframe').src="MainGrid.aspx?RL=Y&RS=application_List&PT=Applications&KF=idApplication&WNM=" + jWindowName + "&P1=" + jCID + "&P2=" + jPID + "&P3=" + jSRC + "&P4=" + jMAX + "&P5=" + jUSR
}
function jsCallFilesTab(itemID) {
ob_em_SelectItem(itemID);
jsGetVals();
document.getElementById('tabIframe').src="MainGrid.aspx?RL=Y&RS=file_List&PT=Files&KF=idImported&P1=" + jCID + "&P2=" + jPID + "&P3=" + jSRC + "&P4=" + jMAX + "&P5=" + jUSR
// + "&WNM=" + jWindowName
}
function jsCallIntranetTab(iFrame,itemID) {
ob_em_SelectItem(itemID);
document.getElementById(iFrame).src="Intranet.aspx"
}
