
<!-- 
// status bar message display
function dm(msgStr) {
  document.returnValue = false;
  if (document.images) { 
     window.status = msgStr;
     document.returnValue = true;
  }
}
var showMsg = navigator.userAgent != 'Mozilla/4.0 (compatible; MSIE 4.0; Mac_PowerPC)';
function dmim(msgStr) {
  document.returnValue = false;
  if (showMsg) { 
    window.status = msgStr;
    document.returnValue = true;
  }
}


	function convert__()
	{
	//text in the input text area
		var v = document.forms[0].Criteria1.value;
	
		var f = document.forms[0];
	
		if(f.remove_spaces.checked)
		{//remove spaces, tabs, line breaks in the text
			v = v.replace(/\s+/, '');
	//or, remove line breaks in the text and spaces/tabs surrounding the text
	//v = v.replace(/[\n\r]+/g, '\n').replace(/^\s+/, '').replace(/\s+$/, '');
		}
		
	//whether convert ranodomly chosen characters or every characters
		var rnd_conv = f.random_convert.checked;
	//characters to be always converted regardless of 'rnd_conv' 
		var conv_chars = f.convert_chars.value;
	//output format for conversion (0=mixed/1=decimal/2=hex)
		var format = f.entity_format.selectedIndex;
	
		var s='';	//converted string will be stored in this variable
		var c;	// tempoary variable for each characters in the text
		
		for(var i=0; i<v.length;i++)
		{
			c = v.charAt(i);
			if(rnd_conv && Math.random()<0.5 && conv_chars.indexOf(c)<0)
			{
			}
			else
			{//convert the character to a decimal/hex character reference
				c = c.charCodeAt(0);
				if( (format == 2) || ((format == 0) && (Math.random()<0.5)) )
					c = 'x'+ c.toString(16);
				c = '&#'+ c + ';'
			}
			s += c;
		}
	
	//the output text area
		var out = document.forms[0].Criteria;
		out.value = s;
		//out.focus();
		//out.select();
	}
	
	function verify__(v)
	{
	//the converted string
		var v = document.forms[0].Criteria.value;
	//string to be rendered to a new window
		var s = '<HTML><BODY><P><A href="' + v + '">' + v + '<'+'/A><'+'/P><'+'/BODY><'+'/HTML>';
	//Adapting to NN4, NC4. They eliminates dynamical rendered HTML contents in windows obtained by open() function if 3rd parameter is given in it.
		var w = document.layers? open('about:blank', 'verify1'): open('about:blank', 'verify1', 'width=300,height=200,directories=no,location=no,menubar=yes,scrollbars=yes,status=yes,toolbar=no,resizable=yes');
		var d = w.document;
		d.open();
		d.write(s);
		d.close();
		w.focus();
	}


function siteRolloverON(icon,state) {
	state=state*10

	var rollname="document." + icon + ".src = rollover[state].src"
	eval(rollname);

}
	
function siteRolloverOFF(icon,state) {
	var rollname="document." + icon + ".src = rollover[state].src"
	eval(rollname);

} 

function dynMenuRolloverON(icon,state) {
	state=state*10

	var rollname="document." + icon + ".src = dynmenu[state].src"
	eval(rollname);

}
	
function dynMenuRolloverOFF(icon,state) {
	var rollname="document." + icon + ".src = dynmenu[state].src"
	eval(rollname);

} 

function navRollON(icon,state) {
	state=state*10
	var rollname="document." + icon + ".src = navbar[state].src"
	eval(rollname);
}
	
function navRollOFF(icon,state) {
	var rollname="document." + icon + ".src = navbar[state].src"
	eval(rollname);
} 

// validate email address
function testemail(TheForm,TheField,TheValue) {
  // are regular expressions supported?
  var supported = 0;
  if (window.RegExp) {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported) 
    return (TheValue.indexOf(".") > 2) && (TheValue.indexOf("@") > 0);
  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
  return (!r1.test(TheValue) && r2.test(TheValue));
}

// limit characters in text area
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else 
countfield.value = maxlimit - field.value.length;
}

//scrolling text
function verScroll(dir, spd, loop) {
	loop = true;
	direction = "up";
	speed = 10;
	
	scrolltimer = null;
	if (document.layers) {
		var page = eval(document.TrimLayer.document.MenuLayer); // the require syntax for nested layer to be called in NS4.0
		var handle = eval(document.ControlLayer);
				
		
	}
	else {
		if (document.getElementById) {
			var page= eval("document.getElementById('MenuLayer').style");
			var handle= eval("document.getElementById('ControlLayer').style");
		}
		else {
			if (document.all) {
			    var page = new Object();  //need to say new Object to be compatible on IE on the Mac
				var handle = new Object();
				page = eval(document.all.MenuLayer.style); //used by ie4.0 
				handle = eval(document.all.ControlLayer.style);
      		}
   		}
	}
	direction = dir;
	speed = parseInt(spd);
	var y_pos = parseInt(page.top);
	var handle_pos = parseInt(handle.top);
	if (loop == true) {
		if (direction == "dn") {
			if (y_pos > -(lwr)) {
			    page.top = (y_pos - (speed));
				handle.top = parseInt(28*y_pos/-lwr)
				dm (' ');
			} 
		}
	else {
		if (direction == "up" && y_pos < 10) {
			if (y_pos < 0) {
				page.top = (y_pos + (speed));
				handle.top = parseInt(28*y_pos/-lwr)
				dm (' ');
			}
		} 
		else {
			if (direction == "top") {
				page.top = 10;
				dm (' ');
      		}
   		}
	}
	scrolltimer = setTimeout("verScroll(direction,speed)", 1);
   	}
}

function stopScroll() {
	loop = false;
	clearTimeout(scrolltimer);
}

//dreamweaver added
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);

// stop hiding -->

