	function populateIframe(sfrm, html) {
	  var ifrm = document.getElementById(sfrm);
	  ifrm = (ifrm.contentWindow) ? ifrm.contentWindow : (ifrm.contentDocument.document) ? ifrm.contentDocument.document : ifrm.contentDocument;
	  writeHTML(ifrm, html);
	}
	function writeHTML(win, html) {win.document.open(); win.document.write(html); win.document.close()}


// -------------------- Mouseover / Mouseout Functions ----------------------
	function onMO(o) {
		var r = o.summary + "|normal|normal"; var spt = r.split("|");
		if (!o.style.color || o.style.color==spt[2]) {o.style.color=spt[0]; o.style.backgroundColor=spt[1]; o.style.fontWeight=spt[4];}
		else{o.style.color=spt[2]; o.style.backgroundColor=spt[3]; o.style.fontWeight=spt[5];}
	}

  function bmpMOver(s) { var o=eval(s); o.name=o.style.backgroundColor; o.style.backgroundColor="#00ffff"; o.style.color='#000000';}
  function bmpMOut(s) { var o=eval(s); o.style.backgroundColor=o.name; o.style.color='#0000ff'; }

/*  --------- To be deleted once bmp.shtml is uploaded to members.shtml -------------  */
  function bpMO(o) {o.style.color='blue';}
  function kpMO(o) {o.style.color='aqua';}

	function sjpMO(o) {
		if (!o.style.color || o.style.color=="white") {o.style.color="blue"; o.style.backgroundColor="aqua";} 
		else{o.style.color="white"; o.style.backgroundColor="blue";}
	}
/*  --------- To be deleted once bmp.shtml is uploaded to members.shtml -------------  */


	function bmpMouseOver(obj001) {
	  document.getElementById(obj001).style.backgroundColor='red';
	
	  for (i=1; i<30; i++) {
	    try {
	      for (n=1; n<30; n++){document.getElementById('menu' + i + '_' + n).style.display='none';}
	    }
	    catch (err) {
	      //Error Caught here = alert('error ' + err.number + ' caught');
	    }
	  }
	
	
	    try {
	     for (n=1; n<30; n++){document.getElementById(obj001 + '_' + n).style.display='block';}
	    }
	    catch (err) {
	      //Error Caught here = alert('error ' + err.number + ' caught');
	    }
	}
	
	function bmpMouseOver2(sNME) {eval(sNME).style.color='red'}
	
	function bmpMouseOut() {
	  try {
	     for (i=1; i<30; i++) {var o=document.getElementById('menu' + i); o.style.backgroundColor='#006699';}
	  }
	  catch (err) {
	     //Error Caught here = alert('error ' + err.number + ' caught');
	  }
	}
	
	function bmpMouseOut2() {
	  for (i=1; i<30; i++) {
	    try {
	     for (n=1; n<30; n++){eval('menu' + i + '_' + n).style.color='black';}
	    }
	    catch (err) {
	      //Error Caught here = alert('error ' + err.number + ' caught');
	    }
	  }
	}
// -------------------------------------------------------------------------------------
  function bmpVH(arrV, arrH) {
  	if (arrH) {for (i=0; i<arrH.length; i++) {eval(arrH[i]).style.display="none";}}
  	if (arrV) {for (i=0; i<arrV.length; i++) {eval(arrV[i]).style.display="block";}}
  }

	function bmpClick(sURL, obj001) {
		for (i=1; i<30; i++) {try {var o=document.getElementById('menu' + i); o.style.color='white';} catch (err) {}}
	  eval(obj001).style.color='black';
	  mainContent.location=sURL;
	}


// -------------------- Functions for Images ----------------------
  function bpAddIMG(s, u, id, alt) {
  	if (!id) {var id=0}; if (!alt) {var alt=""}; var js="";
  	switch (strWORD(s, 1).toLowerCase()) {
  		case "print" : if (!u) {var u = "../images/print.gif"}; js = "onclick='bmpPRINT(" + id + ", this);'"; break;
			case "calendar" : if (!u) {var u = "../images/calendar.gif"}; js=" onclick='callDP(&quot;" + id + "&quot;, this);'"; break;
  		default : js = "onclick='bmpMISC(" + id + ", this);'"; break;
  	}
  	return "<img alt='" + s + alt + "' border='0' src='"  + u + "' style='cursor:pointer; cursor:hand;'" + js + ">"
  }

// -------------------- Functions for Controls [such as listbox] ----------------------
  function bmpLB(o) {return o.options[o.selectedIndex].value}
  function bmpSSO(o, v) {for (var i=0; i<o.options.length; i++) {if (o.options[i].text==v) {o.selectedIndex=i}}}
  function bmpSSV(o, v) {for (var i=0; i<o.options.length; i++) {if (o.options[i].value==v) {o.selectedIndex=i}}}

//returns the value of the selected radio button.
	function kpRadio(o) {
		if(!o) {return ""}; var l = o.length;
		if(l == undefined) {if(o.checked) {return o.value} else {return ""}};
		for(var i=0; i<l; i++) {if(o[i].checked) {return o[i].value}};
		return "";
	}

	function spRadio(o, v) {
		var l = o.length; if(l == undefined) {return};
		for(var i=0; i<l; i++) {if(o[i].value==v) {o[i].checked=true} else {o[i].checked=false}};
	}

	function bpRadio(s, n, d, sy) {
		var a=s.split("|");	var r="";	if (d==null) {var d=a.length-1};
		for (var i=0; i<a.length; i++) {
			if (i==d) {var c=" checked"} else {var c=""}; 
			if (!sy) {var sz=""} else if (sy.match(/|/gi)) {var sz=sy.split("|")[i]} else {var sz=sy};
			r+= "<input name='" + n + "'" + c + " type='radio' value='" + a[i] + "' alt='" + a[i] + "' class='" + sz + "'>"
		}
		return r;
	}
// -------------------- General Functions ----------------------
  function popRTF(o, i, s) {var sID = o.document.forms.aspnetForm[i].id; var e =  o.RTE_GetEditorDocument(sID); e.body.innerHTML = s;}
  function bmpFTL(s) {return s.substring(s.lastIndexOf('/') + 1, s.length-4);}
  function strMANIPULATE(s,l) {if (s.length > l) {s = s.substring(1,l) + " <b><font color=blue>.....</font></b>";}; return s;}

// ----------------- Number Functions ----------------------------
  function fmt00(i) {return (i < 10) ? '0'+i : ((i < 100) ? i : i)}
  function fmt000(i) {return (i < 10) ? '00'+i : ((i < 100) ? '0'+i : i)}
  function bmpFR(s) {return s.replace(/,/g, '#').replace(/\./g, ',').replace(/#/g, '.')}
  function FComma(SS) { 
	var T='', S=String(SS), L=S.length-1, C, j, P = S.indexOf('.')-1
	if (P<0) P=L
	for (j=0; j<=L; j++) {
		T+=C=S.charAt(j)
		if ((j < P) && ((P-j)%3 == 0) && (C != '-')) T+=',' 
	}
	return T 
  }
// ----------------- String Manipulation Functions ----------------------------
  function bpRemoveCRLF(s) {return s.replace(/[\r\n]/g, "");}
  function strWORD(s, p) {var arrW = s.split(" "); if (p>arrW.length) {return arrW[0]} else{return arrW[p-1]}}
  function strWORD2(s, p) {var l=-1; var n=0; do {var f=l+1; l=s.indexOf(" ", f); n++} while (n!=p); if (l==-1) {l=s.length}; return s.substring(f,l)}
  function trim(s) {return s.replace(/^\s+|\s+$/g, '')}
  function left(s, n) {if(!n) {n=1}; return s.toString().substring(0, n)}
  function right(s, n) {if(!n) {n=1}; s=s.toString(); l=s.length; return s.substring(l-n, l)}
  function toProperCase(s) {return s.toLowerCase().replace(/^(.)|\s(.)/g, function($1) {return $1.toUpperCase()})}
  function bmpEscape(s) {s=escape(s); return s.replace(/\%/gi, "%25")}
  function bmpUnescape(s) {s = s.replace(/\%25/gi, "%"); return unescape(s)}
// ----------------- Date Functions ----------------------------
  Date.prototype.getDOY = function() {var onejan = new Date(this.getFullYear(),0,1); return Math.ceil((this - onejan) / 86400000);} 
  function calcDAYS(d, t) {return parseInt(d.getDate() / getDaysInMonth(d.getMonth()+1, d.getFullYear())  * t)}
  function calcDATEDIFF(s, f) {return f.getMonth() - s.getMonth() + ((s.getFullYear() - f.getFullYear()) * 12);}
  function dateDDMMYYYY(d) {return d.getDate() + "-" + dateMMM(d.getMonth()) + "-" + d.getFullYear();}
  function dateMMMYYYY(d) {return dateMMM(d.getMonth()) + "-" + d.getFullYear();}
  function dateMMM(n) {var m = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); return m[n];}
  function dateXMM(s) { var m = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); 
  									for (n=0; n<12; n++) {t=eval("/" + m[n] + "/i"); if (s.match(t)) {return n;}} return s;}
//  									for (n=0; n<12; n++) {if (m[n]==s) {return n;}}}
  function dateWSS(d) {return d.getDate() + "/" + d.getMonth() + "/" + d.getFullYear();}
  function datePLUS(d, n) {var myDate = new Date(d); myDate.setDate(myDate.getDate()+n); return myDate;}
  function dateYMD(d) {return d.getFullYear() + "/" + d.getMonth()+1 + "/" + d.getDate()}
  function dateCON1(s) {var dvArr = s.split('/'); return d = new Date(parseInt(dvArr[2], 10), parseInt(dvArr[1], 10) - 1, parseInt(dvArr[0], 10));}
  function dateCON2(s) {var dvArr = s.split('-'); return d = new Date(parseInt(dvArr[2], 10), dateXMM(dvArr[1]), parseInt(dvArr[0], 10));}
  function getDaysInMonth(m, y) {		
	switch(m) {
		case 1: case 3: case 5: case 7: case 8: case 10: case 12: return 31;
		case 4: case 6: case 9: case 11: return 30;
		case 2: if (((y% 4)==0) && ((y% 100)!=0) || ((y% 400)==0)) return 29; else return 28;
	}
  }				
function formatDATE(dateIN) {return dateDDMMYYYY(dateIN)}
function dateConverter(_from) {return dateCON2(_from)}

// ----------------- General Functions ----------------------------
  function bmpEscape(s) {s=escape(s); return s.replace(/\%/gi, "%25")}
  function bmpUnescape(s) {s = s.replace(/\%25/gi, "%"); return unescape(s)}
  function bmpRemoveTag(s, t) {
  	var m = eval("/<" + t + "[^<]+>/gi"); s = s.replace(m, ""); 
  	var m = eval("/<[^<]+" + t + ">/gi"); s = s.replace(m,'');
  	var m = eval("/<" + t + ">/gi"); return s.replace(m,'');
  }
  function bmpRemoveTags(s, arrT) {if (arrT) {for (i=0; i<arrT.length; i++) {s = bmpRemoveTag(s, arrT[i])}; return s.replace(/^\s*|\s(?=\s)|\s*$/g, '')}}
  function strREPLACE(s) {return bmpRemoveTags(s, ["DIV", "FONT", "TABLE", "TBODY", "TR", "TD", "IMG", "EM", "STRONG", "NOBR", "P", "A", "UL", "LI", "BR"])}

function resizeME() {
	var iframe = mainContent.document;
	var ch=(+document.body.clientHeight); var tm=(+document.body.topMargin); var bm=(+document.body.topMargin);
	var cw=(+document.body.clientWidth); var lm=(+document.body.leftMargin); var rm=(+document.body.rightMargin);

	iheight = (iframe.body.scrollHeight + 20) + 'px'; 
//	iwidth = (iframe.body.scrollWidth + 17) + 'px';

	iframe=document.getElementById('mainContent');			
	iframe.style.height = iheight;
//	iframe.style.width = iwidth;

////    eval(frame).height = document.getElementById("mainContent").document.body.scrollHeight + 'px';
////    eval(frame).height = mainContent.document.body.scrollHeight + 'px';
}

  function resizeIframe(iframe) { 
/*		var iframe = document.getElementById(sframe);
		var ch=(+document.body.clientHeight); var tm=(+document.body.topMargin); var bm=(+document.body.topMargin);
		var cw=(+document.body.clientWidth); var lm=(+document.body.leftMargin); var rm=(+document.body.rightMargin);		
*/
 		var iheight = (+iframe.document.body.scrollHeight+15); 
//   	iframe.style.height = iheight + "px";
   	document.getElementById(iframe.name).style.height = iheight + "px";
  }
 
//   	iframe.style.height = ch +"px"; 
//	 document.getElementById('frame').onload = resizeIframe; 
//	 window.onresize = resizeIframe; 


function resizeDIV(o) {
/*
	var th=0;
//	 		var o = document.getElementsByTagName("TABLE"); var o2 = document.getElementById('LeftNavigationAreaCell'); var th=0;
//				for (n=0;n<6;n++) {var t=document.getElementById("bmpTABLE"+n); if (t.style.display=="block") {th+=(+t.clientHeight)}}
//			try {var t=document.getElementById("bpNavBar"); th+=(+t.childNodes[0].clientHeight);} catch (err) {}
//			try {var t=document.getElementById("bpHead"); th+=(+t.childNodes[0].clientHeight);} catch (err) {}
//			var tn=(+o[0].clientHeight)-(+o2.parentNode.parentNode.parentNode.parentNode.clientHeight);
//				var s=""; for (n=0;n<25;n++) {s+= n + ":" + o[n].clientHeight + "\n"}; alert(s);
	
	var tn=0;
	var dh=0; //var oH=iframe.getElementsByName("bmpH");
//	  		dh = oH[0].clientHeight;
/*	for (n=0; n<oH.length; n++) {
		if (oH[n].parentNode.parentNode.parentNode.parentNode.parentNode.style.display=="block") {dh+=(+oH[n].clientHeight)}
	}*/

	var ch=(+document.body.clientHeight); var tm=(+document.body.topMargin); var bm=(+document.body.bottomMargin);
	var cw=(+document.body.clientWidth); var lm=(+document.body.leftMargin); var rm=(+document.body.rightMargin);
//	var ln=(+document.getElementById('LeftNavigationAreaCell').clientWidth);
	
//	var tbh=tm+bm+th+dh+tn+34;		//34px is the empty space at the bottom of the iframe that I do not currently control?	
	var tbh=tm+bm+34;		//34px is the empty space at the bottom of the iframe that I do not currently control?	
	var ht=(ch-tbh)+'px';

//alert(ht);

	o.style.height=ht;
}

function moveME() {
  arg=moveME.arguments;
  for (i=1; i<(arg.length); i++) {if (eval(arg[i]).style.display=='block'){liv=i;}}

  d=arg[0];
  switch(d) {
    case 0 : liv++; if (liv>3) {liv=3}; break;
    case -1 : liv--; if (liv<1) {liv=1}; break;
    default : liv=d; break;
  }
  for (i=1; i<(arg.length); i++) {eval(arg[i]).style.display='none';}
  eval(arg[liv]).style.display='block';

  prev.style.display='block'; 
  mve1a.style.display='block';
  mve2a.style.display='block'; 
  mve3a.style.display='block';
  mve1b.style.display='none';
  mve2b.style.display='none'; 
  mve3b.style.display='none';
  next.style.display='block'; 

  eval('mve' + liv + 'a').style.display='none';
  eval('mve' + liv + 'b').style.display='block';

  switch(liv) {
    case 1: prev.style.display='none'; break;
    case 3: next.style.display='none'; break;
  }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/* Pop up window used by Printer Friendly routine */
function bpPopUp(sBody, sTitle) {
    var pwin = window.open("", "kpWindow");
	pwin.moveTo(20,20);

	if (!sTitle) {var inHTML = sBody}
	else {var inHTML="<html><head><title>" + sTitle + "</title></head><body>" + sBody + "</body></html>"}

//    pwin = (pwin.contentWindow) ? pwin.contentWindow : (pwin.contentDocument.document) ? pwin.contentDocument.document : pwin.contentDocument;
    pwin.document.open();
    pwin.document.write(inHTML);
    pwin.document.close();
}

/*
window.open ("http://www.javascript-coder.com","mywindow","status=1,toolbar=1");

status  The status bar at the bottom of the window. 
toolbar  The standard browser toolbar, with buttons such as Back and Forward. 
location  The Location entry field where you enter the URL. 
menubar  The menu bar of the window 
directories  The standard browser directory buttons, such as What's New and What's Cool 
resizable Allow/Disallow the user to resize the window. 
scrollbars  Enable the scrollbars if the document is bigger than the window 
height Specifies the height of the window in pixels. (example: height='350') 
width  Specifies the width of the window in pixels. 

*/

function isEven(v){if (v%2 == 0) return true; else return false;}
function isOdd(v){if (v%2 == 0) return false; else return true;}

function addTIMES(t1, t2, t3, t4) {
	if (!t1) {return t2} 
	else {    
		if (!t2) {var t2="00:00:00"}; if (!t3) {var t3="00:00:00"}; if (!t4) {var t4="00:00:00"};

		var intH = (+t1.split(":")[2]) + (+t2.split(":")[2]) + (+t3.split(":")[2]) + (+t4.split(":")[2]);
    var intP = parseInt(intH / 100);
    var intH = parseInt(((intH / 100) - intP) * 100);
    
    var intS = (+t1.split(":")[1]) + (+t2.split(":")[1]) + (+t3.split(":")[1]) + (+t4.split(":")[1]) + intP;
    var intP = parseInt(intS / 60);
    var intS = parseInt(((intS / 60) - intP) * 60);
    
    var intM = (+t1.split(":")[0]) + (+t2.split(":")[0]) + (+t3.split(":")[0]) + (+t4.split(":")[0]) + intP;
    var intP = parseInt(intM / 60);
    var intM = parseInt(((intM / 60) - intP) * 60);
    
    return fmt00(intM) + ":" + fmt00(intS) + ":" + fmt00(intH);

/*		return t1;*/
	}
}


/* ----------------- Layer Display Functions ----------------------------  */
  var closetimer		= 0;
  var bmpPopUp      = 0;
  var bmpTextBox 		= 0;
  var bmpDB         = 0;
  var bmpCW 				= "";		//CW for Close Window

  function mopen(sID, oID) {
	mcancelclosetime();	mclose(); bmpPopUp = document.getElementById(sID); bmpPopUp.style.visibility = 'visible';
	if (oID != null) { bmpDB = oID; bmpTextBox = document.getElementById('bmp'+sID); } else { bmpTextBox = null };
  }

  function mstablise(sID) {bmpTextBox = document.getElementById('bmp'+sID);}
  function mclose(cw) {
  	if(bmpPopUp) {bmpPopUp.style.visibility = 'hidden'; } if (bmpTextBox) bmpTB(bmpTextBox, true);
  	if(bmpCW) {parent.self.close()}
  	if (cw) {var iePARENT = bmpPopUp.parentNode; var ieCHILD = bmpPopUp; iePARENT.removeChild(ieCHILD);}
  }
  function mclosetime(ic, s) {if(!ic) {ic=500}; bmpCW=s; closetimer = window.setTimeout(mclose, ic);}
  function mcancelclosetime() {if(closetimer) window.clearTimeout(closetimer); closetimer = null;}

  function sddmMOver(o) {o.style.color="#FFF"; o.style.background="#49A3FF";}
  function sddmMOut(o) {o.style.color="#2875DE"; o.style.background="#EAEBD8";}

//remember to create sddmInner() in the current htm file as the inner will be different for each requirement
  function createWin(sNAME, offV, offH, id, blnV, offW) {
  	if (!offV) {offV=0}; if (!offH) {offH=0}; if(!id) {id=0};
		var winDivID = "m" + sNAME;
		if (!document.getElementById(winDivID)) {
			var newNode = document.createElement("div");
			newNode.setAttribute("id", winDivID);
			newNode.setAttribute("class", "bpWIN");
			newNode.setAttribute("style", "visibility: hidden;");
			document.body.appendChild(newNode);
		}

		var winDiv = document.getElementById(winDivID);
		winDiv.style.position = "absolute";
		if (!blnV) {
			var targetWIN = document.getElementById(sNAME);
			var x = targetWIN.offsetLeft + parseInt(targetWIN.clientWidth/2) + offH;
			var y = targetWIN.offsetTop + targetWIN.offsetHeight + offV;
		}
		else {
			var targetWIN = document.getElementById(sNAME);
		  var x = mouseX(window.event) + offH; var y = mouseY(window.event) + offV;
		  var cw=(+document.body.clientWidth); if ((x+offW)>cw) {x=cw-offW}
		}
		winDiv.style.left = x + "px";
		winDiv.style.top = y + "px";
		winDiv.style.zIndex = 10000;
		
		winDiv.innerHTML = "<div id='sddm' name='sddm'>" + sddmInner(id) + "</div>";
	
		mopen(winDivID);
		parent.resizeME();
  }

	function kpOK(id) {alert('bmp.js' + id)};
//The following routine needs bp.css loaded.
	function kpConfirm(sTitle, sMsg, sBtnOK, sBtnCLOSE, bHideBtn, sComments, arrRADIO) {
		if (!sTitle) {sTitle="Default Confirmation Box"}; if (!sMsg) {sMsg="Click OK to confirm"};
		if (!sBtnOK) {sBtnOK="OK"}; if (!sBtnCLOSE) {sBtnCLOSE="CLOSE"};

		if (!document.getElementById("bpCONFIRM")) {
			var newNode = document.createElement("div");
			newNode.setAttribute("id", "bpCONFIRM");
			newNode.setAttribute("class", "bpWIN");
			newNode.setAttribute("style", "visibility: hidden;");
			document.body.appendChild(newNode);
		}	
/*
	  var x = mouseX(window.event); var y = mouseY(window.event);
	  var cw=(+document.body.clientWidth); if ((x)>cw) {x=cw}

		var x=300; var y=100;
*/
		var winDiv = document.getElementById("bpCONFIRM");

		html =	"<div>";
		html +=	"<table class='bpWIN' style='width:400px;'>";
		html +=	"<tr><td class='ms-menutoolbar' style='color:yellow; font: bold 12pt;'>"  + sTitle +  "</td></tr>";
		html +=	"<tr><td>&nbsp;</td></tr>";
		html +=	"<tr><td class='bp-lgtext' id='kpMSG'>" + sMsg + "</td></tr>";
		html +=	"<tr><td>&nbsp;</td></tr>";

// ------------------- user comments section -------------------
//var n = "bmp" + id + "t" + r
		if (sComments) {
			html +=	"<tr><td style='text-align:center;'><table>";		
			if (sComments=="x") {sComments=""};
			html +=	"<tr><td>" + bmpTextArea (sComments, null, null, 300, 100, null, 'returnText') + "</td></tr>";
			html +=	"</table></td></tr>";
			html +=	"<tr><td>&nbsp;</td></tr>";
		}
// ------------------- user comments section -------------------

// ------------------- buttons section -------------------
		html +=	"<tr><td>&nbsp;</td></tr>";
		html +=	"<tr><td style='text-align:center;'><table>";		
		html +=	"<tr>";	var s = '"' + sTitle + '"';	
		html +=	"<td class='bp-OK' onclick='kpOK(1, " + s + ");' onmouseover='bmpMO(this);' onmouseout='bmpMO(this);'>" + sBtnOK + "</td>";
		if (!bHideBtn) {
			html +=	"<td style='width:15%'>&nbsp;</td>";
			html +=	"<td class='bp-OK' onclick='kpOK(2, " + s + ");' onmouseover='bmpMO(this);' onmouseout='bmpMO(this);'>" + sBtnCLOSE + "</td>";
		}
		html +=	"</tr>";
		html +=	"<tr><td>&nbsp;</td></tr>";
		html +=	"</table></td></tr>";
// ------------------- buttons section -------------------

		html +=	"</table>";
		html +=	"</div>";
		
		winDiv.innerHTML = html;

		var ch=(+document.body.clientHeight); var tm=(+document.body.topMargin); var bm=(+document.body.bottomMargin);
		var cw=(+document.body.clientWidth); var lm=(+document.body.leftMargin); var rm=(+document.body.rightMargin);
		var y=parseInt((ch/2)-tm - 200)
		var x=parseInt((cw/2)-lm - 200)
		winDiv.style.position = "absolute";
		winDiv.style.left = x + "px";
		winDiv.style.top = y + "px";
		winDiv.style.zIndex = 10000;
		
		mopen("bpCONFIRM");
	}

  function kpSPLASH(sTitle, sMsg, iCloseTime, bCloseWindow) {
		if (!sMsg) {return};
		if (!document.getElementById("bpSPLASH")) {
			var newNode = document.createElement("div");
			newNode.setAttribute("id", "bpSPLASH");
			newNode.setAttribute("class", "bpWIN");
			newNode.setAttribute("style", "visibility: visible;");
			document.body.appendChild(newNode);
		}

		var winDiv = document.getElementById("bpSPLASH");
		
		html =	"<div>";
		html +=	"<table class='bpWIN' style='width:400px;'>";
		html +=	"<tr><td class='ms-menutoolbar' style='color:yellow; font: bold 12pt;'>"  + sTitle +  "</td></tr>";
		html +=	"<tr><td>&nbsp;</td></tr>";
		html +=	"<tr><td class='bp-lgtext' id='kpMSG'>" + sMsg + "</td></tr>";

/*
		html +=	"<tr><td style='background-color:blue; color:white; font: bold;'>"  + sTitle +  "</td></tr>";
		html +=	"<tr><td>&nbsp;</td></tr>";
		html +=	"<tr><td id='kpMSG'>" + sMsg + "</td></tr>";
*/
		html +=	"</table>";
		html +=	"</div>";
		
		winDiv.innerHTML = html;

		var ch=(+document.body.clientHeight); var tm=(+document.body.topMargin); var bm=(+document.body.bottomMargin);
		var cw=(+document.body.clientWidth); var lm=(+document.body.leftMargin); var rm=(+document.body.rightMargin);
		var y=parseInt((ch/2)-tm - 200)
		var x=parseInt((cw/2)-lm - 200)
/*		var y=parseInt((+document.body.clientHeight)/2); 
		var x=parseInt((+document.body.clientWidth)/2);*/

		winDiv.style.position = "absolute";
		winDiv.style.left = x + "px";
		winDiv.style.top = y + "px";
		winDiv.style.zIndex = 10000;

		mopen("bpSPLASH");
		if(!iCloseTime) {return;};
		mclosetime(iCloseTime, bCloseWindow);
/*		winDiv.style.display="block";
		winDiv.style.visibility = 'visible'*/
  }
/* ----------------- END OF : Layer Display Functions ----------------------------  */

