<!--
function e() {}

function updateHeight() {
	var adjust = 30;
	if (window.navigator.userAgent.indexOf("SV1") != -1) //IE with SP2
	{ 
		adjust = 50;
	}
	
	if (window.document.body.scrollHeight+parseInt(adjust)<screen.availHeight) 
		window.parent.dialogHeight=(window.document.body.scrollHeight+parseInt(adjust))+'px'; 
	else 
		window.parent.dialogHeight=screen.availHeight+'px';
		
	if (parseInt(window.parent.dialogTop)+window.document.body.scrollHeight+parseInt(adjust)>screen.availHeight) {
		
		window.parent.dialogTop=(screen.availHeight-window.document.body.scrollHeight-parseInt(adjust))+'px';
	}
}

function fixSize() {
	if (document.all) {
		window.parent.document.all['include'].height= window.document.body.scrollHeight;
		window.setTimeout('updateHeight();',1);
	} else if (document.getElementById) {
		window.parent.document.getElementById('include').height=document.height;
	}
}


function updateWidth() {
	if (window.document.body.scrollWidth<screen.availWidth) {
		if (parseInt(window.parent.dialogWidth)<(window.document.body.scrollWidth)) { 
			window.parent.dialogWidth=(window.document.body.scrollWidth+25)+'px'; 
		}
	} else 
		window.parent.dialogWidth=screen.availWidth+'px';
	if (parseInt(window.parent.dialogLeft)+window.document.body.scrollWidth+30>screen.availWidth) {
		
		window.parent.dialogLeft=(screen.availWidth-window.document.body.scrollWidth-30)+'px';
	}
	window.parent.document.all['include'].width= window.document.body.scrollWidth;
	
	
}


function fixWidth() {
	if (document.all) {
		
		window.setTimeout('updateWidth();',1);
	} else if (document.getElementById) {
		window.parent.document.getElementById('include').width=document.width;
	}
	
}

function lfixSize(mWidth,adWidth) {
	//used in letters
	var adjust = 30;
	if (window.navigator.userAgent.indexOf("SV1") != -1) //IE with SP2
	{ 
		adjust = 50;
	}
	var lHeight = screen.availHeight;
	if (document.all) {
		if (window.document.body.scrollHeight < lHeight){
			lHeight = window.document.body.scrollHeight+47;
		}
		window.resizeTo(mWidth+30+adWidth, lHeight);
		if (parseInt(window.screenTop)+lHeight+adjust>screen.availHeight)
			window.moveTo(window.screenLeft,screen.availHeight-lHeight);
	}	
}

function close_win(bRefresh){
	if (document.all){
		window.parent.returnValue=bRefresh;
	} else {
		if (bRefresh) 
			window.parent.opener.document.location.href = window.parent.opener.document.location.href;
	}
	window.parent.close(); 
}

// for referrals
function writeRefInDiv(nObj,bInPopup){
  if(nObj && nObj.Names != 0 ){
	with(document.all) {
	
		if(refNames.value != 0 ){
			refNames.value = refNames.value + ' || ';
			refIDs.value = refIDs.value + ',';
		}
		refNames.value = refNames.value + nObj.Names;
		refIDs.value = refIDs.value + nObj.IDs;
		drawRefTable(bInPopup);
	}
  }	
}
function detachRef(nID,bInPopup){
	var sCont, arrNames, arrIDs, sNames, sIDs;
	sNames = '';
	sIDs = '';
	arrNames = document.all.refNames.value.split(' || ');
	arrIDs = document.all.refIDs.value.split(',');
	for (i=0;i<arrIDs.length;i++) { 
		if (arrIDs[i] != nID) {
			sNames += arrNames[i];
			sNames += ' || ';
			sIDs += arrIDs[i];
			sIDs += ',';
		}
	}	
	sNames = sNames.substring(0, (sNames.length-4));
	sIDs = sIDs.substring(0, (sIDs.length-1));
	document.all.refNames.value = sNames;
	document.all.refIDs.value = sIDs;
	drawRefTable(bInPopup);
}
function drawRefTable(bInPopup) {
    var sCont, arrNames, arrIDs;
    if (document.all.refNames.value != 0) {
		arrNames = document.all.refNames.value.split(' || ');
  		arrIDs = document.all.refIDs.value.split(',');
		sCont = '<table border="0" cellspacing="0" cellpadding="0" bgcolor="#E5E5E5" width="100%">';
		for (i=0;i<arrNames.length;i++) { 
			sCont += '<tr><td>' + arrNames[i] + '</td><td align="right"><a href="#" onClick="detachRef(' + arrIDs[i]+ ','+bInPopup+');return false;">Detach</a></td>';
		}
		sCont += '</table>';
		
		document.all.divRefs.innerHTML = sCont;

	} else {
		document.all.divRefs.innerHTML = '';
	}
	if (bInPopup) fixSize();
}
// ---------------------------

function testTime (date) {
	var s;
	var t;
	var MinMilli = 1000 *60;
	var HrMilli = MinMilli * 60;
	var DyMilli = HrMilli * 24
	t = Date.parse(date);
	s = Math.round(Math.abs(t/DyMilli));
	return(s);
}
function IsNumber(n) {
	var str=new String(n);
	return ( (str.search(/[^0-9.]/)==-1) && !isNaN(parseFloat(str)) );
}
function set_dealteam(newdtObj) {
	if (newdtObj && newdtObj.Names != 'Cancel') {
		document.forms[0].deal_team.value=newdtObj.Names;
		document.forms[0].deal_teamIDs.value=newdtObj.IDs;
		document.forms[0].responsibleID.value=newdtObj.Responsible;
		//	alert("Names:"+newdtObj.Names+"\nIDs:"+newdtObj.IDs+"\nResponsible:"+newdtObj.Responsible);				
	}
}
function blank(url){ // open links in new window from modal with iframe
	window.top.open(url);
}

//////////////// <a href="#" onclick="removeSelected('eventlist','objectID','event','delete');return false;">
function removeSelected(formname, elmname, objname, action) {
	var oForm=document.forms[formname];
	var oObjects;
	if (document.all) {
		oObjects=oForm.elements(elmname);
	}else {
		oObjects=oForm.elements[elmname];
	}
	var AllOK=false;
	var num=0;
	var i;
	if (oObjects) {
		if (oObjects.checked) {
			num=1;
			AllOK=true;
		} else {
			for (i=0;i<oObjects.length;i++) {
				if (oObjects[i].checked) {
					AllOK=true;
					num++;
				}
			}
		}
	} else {
		alert('There is no '+ objname + '(s) available to select.');
		return false;
	}
	if (AllOK) {
		var msgStr; // for request a hard copy in investor portal
		if(action=='request a hard copy')
			msgStr = 'The system will send email request for hard copies of '+num+' document(s). Would you like to proceed?';
		else
			switch(objname) {
				case 'Capital Call':
					msgStr="Deleting this capital call(s) will induce automatic recalculation of total amounts called and remaining.\nRespective investor letters will not be automatically deleted.\n\nWould you like to proceed?";
					break;
				case 'Distribution':
					msgStr="You are trying to delete a fund distribution.\nPlease note respective investor letters will not be automatically deleted.\n\nWould you like to proceed?";
					break;
				default:
					msgStr = 'Are you sure you want to ' + action +' '+num+' '+objname+'(s)?';
					break;
				}
		if (confirm(msgStr)) {
			if ((objname== "contact" || objname== "company") && action == "delete") {
				oForm.elements['a'].value='del';
			}		
			oForm.submit();
			return false;
		}
	} else
		if(action=='request a hard copy')
			alert('Please select at least one '+ objname + '.');
		else
			alert('Please select at least one '+ objname + ' to '+action+'.');
	return false;
}

//////////////// <a href="#" onclick="removeSelected('eventlist','objectID','event','delete');return false;">
function exportSelected(formname, elmname, objname, action) {
	var oForm=document.forms[formname];
	var oObjects;
	if (document.all) {
		oObjects=oForm.elements(elmname);
	}else {
		oObjects=oForm.elements[elmname];
	}
	var AllOK=false;
	var num=0;
	var i;
	if (oObjects) {
		if (oObjects.checked) {
			num=1;
			AllOK=true;
		} else {
			for (i=0;i<oObjects.length;i++) {
				if (oObjects[i].checked) {
					AllOK=true;
					num++;
				}
			}
		}
	} else {
		alert('There is no '+ objname + '(s) available to select.');
		return false;
	}
	if (AllOK) {
		var msgStr;
		msgStr = 'Are you sure you want to ' + action +' '+num+' '+objname+'(s)?';
		if (confirm(msgStr)) {
			oForm.action=oForm.action.replace(/h=[^&]+&?/,'h=do'+objname+'_export&');
			oForm.submit();
			return false;
		}
	} else
		alert('Please select at least one '+ objname + ' to '+action+'.');
	return false;
}


////////////////
function removeItem(loc,objname,action) {
	if (confirm('Are you sure you want to '+action+' this '+objname+'?')) {
		window.location = loc;
		return true;
	}
	return false;
}
function clearFrm() {
	if (confirm('Are you sure you want to clear all data in the form?'))
		window.location=window.location;
}
function checkValidDate(dt,msg) {
	var arrLastDay = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
	
	if (msg == "") msg = "date";
	if (dt.value != 0) {
		var re=/^((0?\d)|(1[0-2]))\/(([0-2]?\d)|(3[0-1]))(\/(\d{1,4}))?$/;
		if (dt.value.search(re)==-1) {
			alert("Please enter a valid "+msg+".");
			dt.value="";
			dt.focus();
			return false;
		}else {
			var arrDates = dt.value.split("/");
			var iDay = arrDates[1];
			var iMonth = arrDates[0];
			var iYear;
			
			if (arrDates.length == 3) {
				 iYear = arrDates[2];
			} else {
				today = new Date();
				iYear = today.getYear();
			}
			
			if (iMonth == 00){
				alert("Please enter a valid "+msg+".");
				dt.value="";
				dt.focus();
				return false;
			}
			
			if (iDay == 00){
				alert("Please enter a valid "+msg+".");
				dt.value="";
				dt.focus();
				return false;
			}
			
			var bRes = IsLeapYear(iYear);
			if (bRes == 1){
				arrLastDay[1]=29;
			} else {
				arrLastDay[1]=28;
			}
			
			if (iDay > arrLastDay[iMonth-1]){
				alert("The day you entered exceeds range of month. Please enter another one");
				dt.focus();
				return false;
			}
			
			if (parseInt(iYear) < 1900 && parseInt(iYear) > 99){
				alert("Please enter year greater than 1900");
				dt.focus();
				return false;
			}
		}
		return true;
	}
	return true;
}
function checkDate(dt,msg) {
	var arrLastDay = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
	
	if (msg == "") msg = "date";
	if (dt.value == 0) {
		alert("Please enter "+msg+".")
	    dt.focus();
	    return false;
	} else {
		var re=/^((0?\d)|(1[0-2]))\/(([0-2]?\d)|(3[0-1]))(\/(\d{1,4}))?$/;
		if (dt.value.search(re)==-1) {
			alert("Please enter a valid "+msg+".");
			dt.value="";
			dt.focus();
			return false;
		} else {
			var arrDates = dt.value.split("/");
			var iDay = arrDates[1];
			var iMonth = arrDates[0];
			var iYear;
			
			if (arrDates.length == 3) {
				 iYear = arrDates[2];
			} else {
				today = new Date();
				iYear = today.getYear();
			}
			
			if (iMonth == 00){
				alert("Please enter a valid "+msg+".");
				dt.value="";
				dt.focus();
				return false;
			}
			
			if (iDay == 00){
				alert("Please enter a valid "+msg+".");
				dt.value="";
				dt.focus();
				return false;
			}
			
			var bRes = IsLeapYear(iYear);
			if (bRes == 1){
				arrLastDay[1]=29;
			} else {
				arrLastDay[1]=28;
			}
			
			if (iDay > arrLastDay[iMonth-1]){
				alert("The day you entered exceeds range of month. Please enter another one");
				dt.focus();
				return false;
			}
			
			if (parseInt(iYear) < 1900 && parseInt(iYear) > 99){
				alert("Please enter year greater than 1900");
				dt.focus();
				return false;
			}
		}
		return true;
	}
	return false;
}

function IsLeapYear(p_year) {
        /*
        Check for leap year ..
        1.Years evenly divisible by four are normally leap years, except for...
        2.Years also evenly divisible by 100 are not leap years, except for...
        3.Years also evenly divisible by 400 are leap years.
        */
        if ((p_year % 4) == 0) {
                if ((p_year % 100) == 0 && (p_year % 400) != 0)
                        return 0;

                return 1;
        } else
                return 0;
}
function checkEmail(eml) {
	if (eml.value == 0) {
		alert("Please enter email address.")
	    eml.focus();
	    return false;
	} else {
		  var re=/^['%\w\.\+-]*@[\w\+-]+(\.[\w\+-]+)*\.[\w\+-]+$/;
		if (eml.value.search(re)==-1) {
			alert("Please enter a valid email address.");
			eml.focus();
			return false;
		}
		return true;
	}
	return false;
}

// from document_edit
function AttachReminder() {
	frm = document.forms[0];
	if (fCheck(frm)) {
		if (frm.elements['attachment'].value != 0){
			if (confirm('You have selected a file that hasn\'t been attached yet.\n\rDo you want to attach it?')) {
				return false;
			}
		}
		if ((frm.elements['URL'].value != 'http://') && (frm.elements['URL'].value != 0)){
			if (confirm('You have entered a link that hasn\'t been attached yet.\n\rDo you want to attach it?')) {
				return false;
			}
		}
		return true;
    }
    return false;
}

function AddAttachment(actstring) {
	form = document.forms[0];
	if (form.elements['attachment'].value == 0) {
		alert('Please select file.');
		return false;
	}
	else {
		if (form.elements['attachment'].value.lastIndexOf('.')<form.elements['attachment'].value.lastIndexOf('\\')) {
			alert ('DealDynamo does not allow uploading files without extension');
			return false;
		}
		if (fCheck(form)) {
			form.action = actstring;
			form.submit();
			return true;
		}
	}
	return false;
}
function DeleteAttachment(actstring) {
	if (confirm('Are you sure you want to delete this file?')) {
		form = document.forms[0];
		form.action = actstring;
		form.submit();
		//return true;
	}
	//return false;
}
function AddLink(actstring) {
	form = document.forms[0];
	if (form.elements['URL'].value == 0) {
		alert('Please enter link.');
		return false;
	}
	else {
		if (fCheck(form)) {
			form.action = actstring;
			form.submit();
			return true;
		}
	}
	return false;
}
function DeleteLink(actstring) {
	if (confirm('Are you sure you want to delete this link?')) {
		form = document.forms[0];
		form.action = actstring;
		form.submit();
		return true;
	}
	return false;
}
//------------------


function hideall() {
	MM_showHideLayers('general','','hide','companies','','hide','contacts','','hide','notes','','hide','documents','','hide','diligence','','hide','products','','hide','referrals','','hide','events','','hide','publish','','hide','pfrequests','','hide','irequests','','hide','requests','','hide','rating','','hide','funds','','hide','my','','hide','hpage','','hide','prefs','','hide','portfolio','','hide','investors','','hide','capcalls','','hide', 'distributions', '','hide');
}

function print_pager(){
	if (document.all) { 
		print();
	}
	else { 
		window.print();
	}
}

function modalwin(url, param, wid, hei, lft, tp) {
	return window.showModalDialog(url,param,"dialogWidth:"+wid+"px;dialogHeight:"+hei+"px;dialogLeft:"+lft+"px;dialogTop:"+tp+"px;status:no;resizable:yes;");
}
/*
function modup(url, param, wid, hei, lft, tp) {
	var bwinmod ; 
	if (bwinmod = window.showModalDialog(url,param,"dialogWidth:"+wid+"px;dialogHeight:"+hei+"px;dialogLeft:"+lft+"px;dialogTop:"+tp+"px;status:no;")
		if (bwinmod) {
			window.location.reload();
		}
	return bwinmod;
}*/
function modup(url, param, wid, hei, lft, tp) {
	if (document.all) {
		var bwinmod ;
		bwinmod = window.showModalDialog(url,param,"dialogWidth:"+wid+"px;dialogHeight:"+hei+"px;dialogLeft:"+lft+"px;dialogTop:"+tp+"px;status:no;resizable:yes;");
		if (bwinmod) {
			var url=new String(window.location.href);
			var re=/changed=[^&?]*/;
			if (url.indexOf('changed=')>-1) {
				url=url.replace(re,'changed=1');
			} else {
				url=url + '&changed=1';
			}
			window.location=url;	}
		return bwinmod;
	}
	else {
		id = Math.random();
		id = id.toString();
		re_d = /\.|,/g;
		id = id.replace(re_d,'');
		wname = 'DealDynamo'+id;
		var newWindow;
		newWindow = window.open(url, wname, 'toolbar=no,menubar=no,scrollbars=yes,resizable=yes,status=no,location=no,height='+hei+',width='+wid+',screenX='+lft+',screenY='+tp);
//		window.open(url, wname, "toolbar=no,menubar=no,scrollbars=yes,resizable=no,status=no,location=no,height="+hei+",width="+wid+",screenX="+lft+",screenY="+tp+",dependent=yes");
//////////////////////////////// cyrilic :)
	//	if (document.layers) newWindow.document.open(charset=windows-1251);
////////////////////////////////
		newWindow.focus();
	}
}

function modup_tab(url, param, wid, hei, lft, tp, tab, pg) {
	if (document.all) {
		var bwinmod ; 
		if (bwinmod = window.showModalDialog(url,param,"dialogWidth:"+wid+"px;dialogHeight:"+hei+"px;dialogLeft:"+lft+"px;dialogTop:"+tp+"px;status:no;resizable:yes;")){
			var url=new String(window.location.href);
			var re=/tab=[^&?]*/;
			if (url.indexOf('tab=')>-1) {
				url=url.replace(re,'tab='+tab);
			} else {
				url=url + '&tab='+ tab;
			}
			if (pg > 0) {
				re = /page=[^&?]*/;
				if (url.indexOf('page=')>-1) {
					url=url.replace(re,'page='+pg);
				} else {
					url=url + '&page='+ pg;
				}
			}
			re=/changed=[^&?]*/;
			if (url.indexOf('changed=')>-1) {
				url=url.replace(re,'changed=1');
			} else {
				url=url + '&changed=1';
			}
			window.location=url;
		}
		return bwinmod;
	}
	else {
		id = Math.random();
		id = id.toString();
		re_d = /\.|,/g;
		id = id.replace(re_d,'');
		wname = 'DealDynamo'+id;
		newWindow = window.open(url, wname, 'toolbar=no,menubar=no,scrollbars=yes,resizable=yes,status=no,location=no,height='+hei+',width='+wid+',screenX='+lft+',screenY='+tp);
//		window.open(url, wname, "toolbar=no,menubar=no,scrollbars=yes,resizable=no,status=no,location=no,height="+hei+",width="+wid+",screenX="+lft+",screenY="+tp+",dependent=yes");
//////////////////////////////// cyrilic :)
	//	if (document.layers) newWindow.document.open(charset=windows-1251);
////////////////////////////////
		newWindow.focus();
	}
}

function fileview(url) {
	if (window.showModalDialog(url,'',"dialogWidth:200px;dialogHeight:600px;status:no;resizable:yes;unadorned:yes")){
		window.location.reload();
	}
}

function popup(url, winname, wid, hei, lft, tp) {
//	if (winname == "") {
		id = Math.random();
		id = id.toString();
		re_d = /\.|,/g;
		id = id.replace(re_d,'');
		wname = winname+'DealDynamo'+id;
//	}
	if (document.all) {
		newWindow = window.open(url, wname, "toolbar=no,menubar=no,scrollbars=yes,resizable=yes,status=no,location=no,height="+hei+",width="+wid+",left="+lft+",top="+tp+",dependent=yes");
	}
	if (document.layers || document.getElementById) {
		newWindow = window.open(url, wname, "toolbar=no,menubar=no,scrollbars=yes,resizable=yes,status=no,location=no,height="+hei+",width="+wid+",screenX="+lft+",screenY="+tp+"");
//////////////////////////////// cyrilic :)
	//	newWindow.document.open(charset=windows-1251);
////////////////////////////////
	}
	newWindow.focus();
}
/* used for demo only until now
function modupnn (url, param, wid, hei, lft, tp) {
	if (document.layers) {
		modup(url, param, wid, hei, lft, tp);
	}
}
*/
///////////////////////// checkbox selector
function SelectAll(fname) {
	for (var i=0;i<document.forms[fname].elements.length;i++) {
		var e = document.forms[fname].elements[i];
		if ((e.name != 'selector') && (e.type=='checkbox'))
			e.checked = document.forms[fname].selector.checked;
	}
}

function CheckSelected() {
	var chkID;
	var nIsPrimary;
	var fname=CheckSelected.arguments[0];
	if (CheckSelected.arguments.length>1) {
		chkID=CheckSelected.arguments[1]; 
		nIsPrimary=document.forms[fname].elements('isprimary'+chkID).value;
		
	} else {
		chkID=0;
		nIsPrimary=0;
	}
	if (nIsPrimary==1) {
		alert('Selected contact is primary for its company. It can not be deleted');
		
	}
	var TotalBoxes = 0;
	var TotalSelected = 0;
	for (var i=0;i<document.forms[fname].elements.length;i++) {
		var e = document.forms[fname].elements[i];
		if ((e.name != 'selector') && (e.type=='checkbox')) {
			TotalBoxes++;
			if (e.checked) {
				TotalSelected++;
			}
		}
	}
	if (TotalBoxes==TotalSelected) {
		document.forms[fname].selector.checked=true;
	}
	else {
		document.forms[fname].selector.checked=false;
	}
}
///////////////////////// checkbox selector

///////////////////////// paging
	function gotoPage(intNumber,strLink, iMaxPage){
		var minPage=1;
		var maxPage=iMaxPage;
		
		
		if ((intNumber<= maxPage) && (intNumber >= minPage)){
			//window.location.replace(strLink+ '&page='+intNumber);
			window.location = strLink+ '&page='+intNumber;
		}
	}
///////////////////////// paging

///////////////////////// alerts for PWS
function showPWSalert(oSel,sType){
	if (oSel.value == 3){
		return modup('../common/modal.asp?src=PWSalert.asp&fl='+sType,'',460,290,160,380);
	}
	return true;
}
/////////////////////////

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) { //v3.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); return x;
}

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_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];}
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_nbGroup(event, grpName) { //v3.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    if ((nbArr = document[grpName]) != null)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = args[i+1];
      nbArr[nbArr.length] = img;
  } }
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


//Acorn Campus Only
function helpwin(URL){	
	var sName,sWidth,sHeight,sXpos,sYpos,sScroll,sResize;
	sName = 'Help';
	sWidth = '330';
	sHeight = screen.availHeight - 250;
//	sXpos = '20';
//	sYpos = '40';
	sXpos = '3000';
	sYpos = '3000';
	sScroll = 'yes';
	sResize = 'yes';
	
	//handled agruments if they are left blank
	if (helpwin.arguments.length > 1){
		sName = helpwin.arguments[1];
		sWidth = helpwin.arguments[2];
		sHeight = helpwin.arguments[3];
		sXpos = helpwin.arguments[4];
		sYpos = helpwin.arguments[5];
		sScroll = helpwin.arguments[6];
		sResize = helpwin.arguments[7];
	}

	var winBars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no';
	var winOptions = 'scrollbars='+ sScroll + ',resizable='+ sResize;
	var winSize = 'height=' + sHeight + ',width=' + sWidth;
	var winPosition = 'left=' + sXpos + ',top=' + sYpos;
	var winFeatures = winBars + ',' + winOptions + ',' + winSize + ',' + winPosition;
			
					
	newWindow = window.open(URL,sName,winFeatures);
	pixleft = screen.availWidth-340;
	pixtop = 140;
	newWindow.moveTo(pixleft, pixtop);
	newWindow.focus();
}

function trim_field_value(form_name, field){
	var re = /( )*/;
	var the_form = document.forms[form_name];
	var the_value =  eval('the_form.' + field + '.value');
	var trim_value = the_value.replace(re, "");

	return trim_value;
}
//-->