self.focus();


function cellHighlight(JS,txt,txtAlign,class01,class02) {
	if (class01 == null) { class01 = 'bg02' }
	if (class02 == null) { class02 = 'bg01' }
	if (txt == null) { txt = "<img src='../images/icons/edit.gif' width='18' height='17' border='0'>" } 
	else if (txt == '+' || txt == '-') { txt = '<nobr>[ ' + txt + ' ]</nobr>' }
	if (txtAlign == null) {	txtAlign = "center"; }
	dr('<td class="' + class01 + '" onClick="' + JS + '" onMouseOver="this.className=\'' + class02 + '\'" onMouseOut="this.className=\'' + class01 + '\'" style="cursor:pointer" align="' + txtAlign + '">' + txt + '</td>')
}

function dr(val) { document.write(val) }

/* 
begin - leech prevention
the following functions hide images and swfs within javascript tags to prevent bandwidth leeching by Googlebot and other spiders
used primarily on item and step images in item.asp, playalong.asp and search.asp
*/

function htmlImage(url,w,h,alt,otherTags) {
	return('<img src="' + url + '" border="0"' 
	+ (w!=null?' width="' + w + '"':'') 
	+ (h!=null?' height="' + h + '"':'') 
	+ (alt!=null?' alt="' + unescape(alt) + '"':'') 
	+ (otherTags!=null?' ' + otherTags:'') 
	+ '>')
}

function htmlSwf(url,w,h) {
	return('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + w + '" height="' + h + '">'
		+ '<param name="movie" value="' + url + '">'
		+ '<param name="quality" value="high">'
		+ '<param name="SCALE" value="exactfit">'
		+ '<param name="menu" value="0">'
		+ '<embed src="' + url + '" width="' + w + '" height="' + h + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" scale="exactfit" menu="0"></embed>'
		+ '</object>')
}

function filePreview(_imgURL, _fileH, _fileW){
	var popW	= (_fileH<=screen.height)?(_fileW + 100):screen.height;
	var popH 	= (_fileH<=screen.height)?(_fileH	+ 100):screen.width;	
	pop('../common/imagePreview.asp?imageURL='+_imgURL+'&fileH='+_fileH+'&fileW='+_fileW,'PHOTO',popW,popH,0,0,0,0,0);
}
// end - leech prevention

winOpen = null
function pop(mypage,winName,w,h,status,toolbar,menubar,scrollbars,resizable) {

  if (status == null) { status = 1 }
  if (toolbar == null) { toolbar = 0 }
  if (menubar == null) { menubar = 0 }
  if (scrollbars == null) { scrollbars = 0 }
  if (resizable == null) { resizable = 0 }

  var options="";
  options+=",width="+w;
  options+=",height="+h;

  winl=(screen.width-w)/2;
  if (winl<25) winl=0;
  options+=",left="+winl;

  wint=(screen.availHeight -h)/2;
  if (wint<50) wint=0;
  options+=",top="+wint;

  options+=",status="+status;
  options+=",toolbar="+toolbar;
  options+=",menubar="+menubar;
  options+=",scrollbars="+scrollbars;
  options+=",resizable="+resizable;

  if (winOpen!=null && !winOpen.closed) { winOpen.close() };

  winOpen = window.open(mypage, winName, options);
}

function printIcon() {
	var retStr = '<a href="javascript:window.print()"><img alt="print page" border="0" src="' 
	if (isAdmin) { retStr += '../images/icons/printerAdmin.gif" width="18" height="16"'; }
	else { retStr += 'images/printer.gif" width="41" height="40"'; }
	return retStr + "></a>";
}

function rowHighlight(JS,class01,class02) {
	if (class01 == null) { class01 = 'bg02' }
	if (class02 == null) { class02 = 'bg01' }
	dr('<tr class="' + class01 + '" onClick="' + JS + '" onMouseOver="this.className=\'' + class02 + '\'" onMouseOut="this.className=\'' + class01 + '\'" style="cursor:pointer">')
}

/* not usure if will use this 
function send2friend() {
	return ('<a href="javascript:pop(\'sendToFriend.asp\',\'send2friend\',300,300,0,0,0,0,0)">' + htmlImage('images/send2friend.gif',41,40,'send this page as a link') + '</a>')
}
*/

/* not usure if will use this 
function mediaPlayer(urlStr) {
	if (urlStr != null) { pop((isAdminDir?'../':'') + 'windowsMedia.asp?' + urlStr,'WindowsMedia',335,315,0,0,0,0,0) }
	else { alert('url is invalid') }
}
*/

/* not usure if will use this 
function submitEnter(formName) {
  if (window.event && window.event.keyCode == 13)
    formName.submit();
  else
    return true;
}
*/