function PopupWin($url, $width, $height)
{
var $windowRef = open ($url, "displayWin", 'width=' + $width + ',height=' + $height + ',toolbar=no,scrollbars=yes,location=no,menubar=no,resizable=yes,status=yes,left=30,top=30,screenx=30,screeny=30'); 
$windowRef.focus(); // Makes certain the new window is on top
}

function PopupWin2($url, $width, $height)
{
var $windowRef2 = open ($url, "displayWin2", 'width=' + $width + ',height=' + $height + ',toolbar=yes,scrollbars=yes,location=yes,menubar=yes,resizable=yes,left=30,top=30,screenx=30,screeny=30'); 
$windowRef2.focus(); // Makes certain the new window is on top
}

function PopupWin3($url, $winname, $width, $height)
{
var $windowRef3 = open ($url, "opener", 'width=' + $width + ',height=' + $height + ',toolbar=no,scrollbars=yes,location=no,menubar=no,resizable=yes,status=yes,left=30,top=30,screenx=30,screeny=30');
$windowRef3.focus(); // Makes certain the new window is on top
}

function PopupWin4($url, $winname, $width, $height)
{
var $windowRef4 = open ($url, "opener4", 'width=' + $width + ',height=' + $height + ',toolbar=no,scrollbars=yes,location=no,menubar=no,resizable=yes,status=yes,left=450,top=10,screenx=450,screeny=10');
$windowRef4.focus(); // Makes certain the new window is on top
}

function chgbizcat1()
{
document.CFForm_1.bizcat1.value = document.CFForm_1.hidebizcat1.value
document.CFForm_1.title.focus()
}

function chgbizcat2()
{
document.CFForm_1.bizcat2.value = document.CFForm_1.hidebizcat2.value
document.CFForm_1.title.focus()
}

function chgpageid()
{
document.CFForm_1.welcomepg.value = document.CFForm_1.welcomepg.value
document.CFForm_1.fname.focus()
}

function stripZeros(inputStr) {
var result = inputStr
while (result.substring(0,1) == "0") {
result = result.substring(1,result.length)
}
return result
}

function chgdate() 
{
var mm = stripZeros(document.CFForm_1.hidedate.value.substring(4,6))
monabbr = new Array(12)
monabbr[0] = ""
monabbr[1] = "Jan"
monabbr[2] = "Feb"
monabbr[3] = "Mar"
monabbr[4] = "Apr"
monabbr[5] = "May"
monabbr[6] = "Jun"
monabbr[7] = "Jul"
monabbr[8] = "Aug"
monabbr[9] = "Sep"
monabbr[10] = "Oct"
monabbr[11] = "Nov"
monabbr[12] = "Dec"
document.CFForm_1.taskdate.value = monabbr[mm] + " " + document.CFForm_1.hidedate.value.substring(6,9) + ", " + document.CFForm_1.hidedate.value.substring(0,4)
document.CFForm_1.tasktitle.focus()
}

function chgdate2() 
{
var mm = stripZeros(document.CFForm_1.hidedate2.value.substring(4,6))
monabbr = new Array(12)
monabbr[0] = ""
monabbr[1] = "Jan"
monabbr[2] = "Feb"
monabbr[3] = "Mar"
monabbr[4] = "Apr"
monabbr[5] = "May"
monabbr[6] = "Jun"
monabbr[7] = "Jul"
monabbr[8] = "Aug"
monabbr[9] = "Sep"
monabbr[10] = "Oct"
monabbr[11] = "Nov"
monabbr[12] = "Dec"
document.CFForm_1.taskdate2.value = monabbr[mm] + " " + document.CFForm_1.hidedate2.value.substring(6,9) + ", " + document.CFForm_1.hidedate2.value.substring(0,4)
document.CFForm_1.tasktitle.focus()
}

function linkarticle()
{
document.CFForm_1.linkedarticle.value = document.CFForm_1.hidelink.value
document.CFForm_1.tasktitle.focus()
}

function getScore() {
var urlString = unescape(window.location);
var quidval = urlString.substr(urlString.indexOf("qid="), urlString.length);
score=0;
formLength = document.forms[0].length;
for(i=0;i<formLength;i++) {
if(document.forms[0].elements[i].checked) {
score+=parseInt(document.forms[0].elements[i].value);
}
}
var quidtag = "qid=";
var valtag = "&val=";
var redirurl = quidval + valtag + score;
showScore = window.open ("/templates/popup_quizscore.cfm?" + redirurl,"","toolbar=no,width=300,height=300,status=no,scrollbars=yes,resize=no,menubar=no,left=200,top=150,screenX=200,screenY=150");
}

//Smart Folding Menu tree- By Dynamic Drive (rewritten 03/03/02)
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use

var head="display:''"
img1=new Image()
img1.src="/templates/folder_closed.gif"
img2=new Image()
img2.src="/templates/folder_closed.gif"

var ns6=document.getElementById&&!document.all
var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1

function checkcontained(e){
var iscontained=0
cur=ns6? e.target : event.srcElement
i=0
if (cur.id=="foldheader")
iscontained=1
else
while (ns6&&cur.parentNode||(ie4&&cur.parentElement)){
if (cur.id=="foldheader"||cur.id=="foldinglist"){
iscontained=(cur.id=="foldheader")? 1 : 0
break
}
cur=ns6? cur.parentNode : cur.parentElement
}

if (iscontained){
var foldercontent=ns6? cur.nextSibling.nextSibling : cur.all.tags("UL")[0]
if (foldercontent.style.display=="none"){
foldercontent.style.display=""
cur.style.listStyleImage="url(/templates/folder_closed.gif)"
}
else{
foldercontent.style.display="none"
cur.style.listStyleImage="url(/templates/folder_closed.gif)"
}
}
}

if (ie4||ns6)
document.onclick=checkcontained

function showbuttons() {   

    var agt       = navigator.userAgent.toLowerCase();
    var IEMAC     = ((agt.indexOf("msie") != -1) && agt.indexOf("mac")!=-1);
	 var N6        = (agt.indexOf("netscape6") != -1 || (agt.indexOf("netscape/6") !=-1 ));

    if ( IEMAC || N6 ) {
      return "<P>";
    }

    return "<P><FORM><INPUT TYPE='button' value='Calculate' Name='btnCallCalc' onClick='document.calculator.calculate()'><INPUT TYPE='button' value='View Report' Name='btnOpenNote' onClick='openNote()'></FORM>";
}

function openNote()
 { 
 
 var agt=navigator.userAgent.toLowerCase(); 
 var is_aol   = (agt.indexOf("aol") != -1);

leftpos=0;
if (screen) {
 leftpos=screen.width/2 - 300;
} 

 if (is_aol) {
   var s = " ";
   s=document.calculator.sJavaScriptReport('HTML');
    document.write(s);
 }
 else {
   var OpenWindow=window.open("","newwin","toolbar=no,menubar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=480,left="+leftpos+",top=20");
   var s = " ";
   if (navigator.appName == "Netscape")
     s=document.applets["calculator"].sJavaScriptReport('HTML');
   else
     s=document.calculator.sJavaScriptReport('HTML');
   OpenWindow.document.write(s);
   OpenWindow.document.close(); 
   OpenWindow.focus();
 }


 }

var checkflag = "false";
	function check(field) {
		if (checkflag == "false") {
		for (i = 0; i < field.length; i++) {
			field[i].checked = true;}
			checkflag = "true";
			return "Uncheck All"; }
		else {
		for (i = 0; i < field.length; i++) {
			field[i].checked = false; }
			checkflag = "false";
			return "Check All"; }
	}

function setBgColor (id, color) {
	for (i=1;i<=document.shell.numcells.value;i++) {
		if (document.layers)
			document['cell' + i].bgColor = color == 'transparent' ? null : color;
		else if (document.all)
			document.all['cell' + i].style.backgroundColor = color;
		else if (document.getElementById)
			document.getElementById(id).style.backgroundColor = color;
	}
}

function setBackgroundImage (id, imageURL) {
	for (i=1;i<=document.shell.numcells.value;i++) {
		if (document.layers)
			document['cell' + i].background.src = imageURL == 'none' ? null : imageURL;
		else if (document.all)
			document.all['cell' + i].style.backgroundImage = imageURL == 'none' ? 'none' : 'url(' + imageURL + ')';
		else if (document.getElementById)
			document.getElementById(id).style.backgroundImage = imageURL == 'none' ? 'none' : 'url(' + imageURL + ')';
	}
}

//-->




