<!-- // load htmlarea
_editor_url = "includes/";                     // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
 document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
 document.write(' language="Javascript1.2"></scr' + 'ipt>');  
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
// -->

function checkpassword(f, element1, element2, msg1, msg2, msg3) {
	//var fieldalias="Password"
	var passed=false
	if (element1.value==''){
	//alert("Please fill in your "+fieldalias+"!")
	alert(msg1)
	element1.focus();
	return false;
	}
	else if (element2.value==''){
	//alert("Please verify your "+fieldalias+"!")
	alert(msg2)
	element2.focus();
	return false;
	}
	else if (element1.value!=element2.value){
	//alert("The two "+fieldalias+"s do not match")
	alert(msg3)
	element1.select();
	return false;
	}else{
		return true;
	}
}

function Style_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function gotoURL(url){ //v3.0
  location=url;
}

function confirmBox(fromURL,toURL,message) {
 var where_to= confirm(message);
 if (where_to== true)
 {
   window.location=toURL;
 }
 else
 {
  window.location=fromURL;
 }
}

function expand_only(obj,id1) {
	el = document.getElementById(obj+'_'+id1);
	el.style.display = '';
	
	for (i=0;i<10;i++) 
		if (i!= id1) {
			ex = document.getElementById(obj+'_'+i);
			ex.style.display = 'none';
		}
}

function shrink_range(obj,id1,id2,id3,id4) {
	
	for (j=id1;j<id2;j++){
		for (i=id3;i<id4;i++) {
				ex = document.getElementById(obj+'_'+i+'_'+j);
				ex.style.display = 'none';
		}
	}
}

function expand(obj) {
	el = document.getElementById(obj);
	el.style.display = '';
}

function shrink(obj) {
	el = document.getElementById(obj);
	el.style.display = 'none';
}

function shrinkexpand(obj) {
	el = document.getElementById(obj);
	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
	} else {
		el.style.display = '';
	}
}

function fill_form(obj,fill_value) {
	obj.value = fill_value;
	
}

function fill(form_no,xx,f) {
	var theForm = opener.document.forms[form_no]; 
	theForm[xx].value = f;
	close();
	return false;
}

function checkUncheckAll(theElement,z, count) {
	var theForm = theElement.form; 
	if (!z) var z=0;
	if (!count) var count = theForm.length;
	var x=0;
	
	while (theForm[x].type!='checkbox') {
		z++;
		if (count!=theForm.length) count++;
		x++;
		
	}
	for (z; z < count; z++) theForm[z].checked = theElement.checked;
}

function LaunchCommand(commandtoRun) {

  var oShell = new ActiveXObject( "WScript.shell" ); 
  // WScript.CreateObject( "WScript.Shell" );;
	oShell.Run(commandtoRun);

}

