function check()
{
   if(checkspace(document.searchform.searchkey.value !='Please Input keywords'))  {
	document.searchform.searchkey.focus();
	alert("Please Input keywords!");
	return false;
  }
  if(checkspace(document.searchform.searchkey.value))  {
	document.searchform.searchkey.focus();
	alert("Please Input keywords!");
	return false;
  }
   document.searchform.submit();
}
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
  function checkuu()
{
    if(checkspace(document.loginfo.username.value)) {
	document.loginfo.username.focus();
	//confirm("Click OK or Cancel to Continue");
	//prompt("aa");
    alert("Please choose a Member ID .",0);
	return false;
  }
    if(checkspace(document.loginfo.UserPassword.value)) {
	document.loginfo.UserPassword.focus();
    alert("Please specify a Password . ");
	return false;
  }
    if(checkspace(document.loginfo.passcode.value)){
	document.loginfo.passcode.focus();
	alert("Please specify Validate! ");
	return false;
	}
	
  }
function Winopen(Url)
{
	window.open(Url,"facility","left=0,top=0,width=700,height=600,toolbar=1,status=1,scrollbars=1");
}
function setDynaList(arrNLists){

 var oList1 = document.forms[arrNLists[2]].elements[arrNLists[1]];
 var oList2 = document.forms[arrNLists[4]].elements[arrNLists[3]];
 var arrList = arrNLists[5];
 
 clearDynaList(oList2);
 
 if (oList1.selectedIndex == -1){
  oList1.selectedIndex = 0;
 }

 populateDynaList(oList2, oList1[oList1.selectedIndex].value, arrList);
 return true;
}
 
function clearDynaList(oList){

 for (var i = oList.options.length; i >= 0; i--){
  oList.options[i] = null;
 }
 
 oList.selectedIndex = -1;
}
 
function populateDynaList(oList, nIndex, aArray){

 for (var i = 0; i < aArray.length; i= i + 3){
  if (aArray[i] == nIndex){
   oList.options[oList.options.length] = new Option(aArray[i + 1], aArray[i + 2]);
   if (aArray[i+2] == nclassid )
   {
	   //alert(oList.options.length);
	   oList.selectedIndex = oList.options.length-1;
   }
  }
 }

 if (oList.options.length == 0){
  oList.options[oList.options.length] = new Option(" - Select -",0);
 }
 else{
  oList.options[oList.options.length] = new Option('- Select -', 0);
 }
	
 if (nclassid == 0)
 {
  oList.selectedIndex = oList.options.length-1;
//oList.selectedIndex = 2;
}

}
function Kermy_JS(jsStr) { 
  return eval(jsStr)
}


var arrNList = new Array();
var arrNSet = new Array();

arrNSet[1] = "ClassID";              // Name of parent list box
arrNSet[2] = "myform";                      // Name of form containing parent list box
arrNSet[3] = "NClassID";               // Name of child list box
arrNSet[4] = "myform";                      // Name of form containing child list box
arrNSet[5] = arrNList;