function roll(image1, reference1)
{
  if (document.images) {document.images[image1].src = reference1;}
}

function popup(url,name,width,height) {
        if (! width) { width=690; }
        if (! height) { height=750; }
        popwindow=window.open(url,name,'menubar=no,scrollbars=no,dependent,width='+width+',height='+height+',left=164,top=4');
}

function popupscroll(url,name,width,height) {
        if (! width) { width=675; }
        if (! height) { height=550; }
        popwindow=window.open(url,name,'menubar=no,scrollbars=yes,dependent,width='+width+',height='+height+',left=164,top=4');
}

function IsEmpty(aTextField) {
  if ((aTextField.value.length==0) || (aTextField.value==null)) { return true; }
  else { return false; }
}

function textCounter(field, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
	field.value = field.value.substring(0, maxlimit);
}

// Author: JS-Examples - http://www.js-examples.com
// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/
// _w : which ID (1) or (2)
// _h : (h)ide or (s)how
function toggleT(_w,_h,_w2,_h2) {
	if (document.all) { // is IE
		if (_h=='s') eval("document.all."+_w+".style.visibility='visible';");
		if (_h=='h') eval("document.all."+_w+".style.visibility='hidden';");
		if (_h2=='s') eval("document.all."+_w2+".style.visibility='visible';");
		if (_h2=='h') eval("document.all."+_w2+".style.visibility='hidden';");
	} 
	else { // is NS? 
		if (_h=='s') eval("document.layers['"+_w+"'].visibility='show';");
		if (_h=='h') eval("document.layers['"+_w+"'].visibility='hide';");
		if (_h2=='s') eval("document.layers['"+_w2+"'].visibility='show';");
		if (_h2=='h') eval("document.layers['"+_w2+"'].visibility='hide';");
	}
}

