// SITE FUNCTIONS 
// TESTABILITY INC.
// CREATED 6/29/2004
// BY James Gibson

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (i = 0; i < sfEls.length; i++) {
		sfEls[i].onmouseover = function() {
			this.className += " over";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" over\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function  _CF_checkCFForm_1(_CF_this)
{
	if  (!_CF_hasValue(_CF_this.username, "TEXT" ))
	{
		if  (!_CF_onError(_CF_this, _CF_this.username, _CF_this.username.value, "Input your user name"))
		{
			return false;
		}
	}

	if  (!_CF_hasValue(_CF_this.password, "PASSWORD" ))
	{
		if  (!_CF_onError(_CF_this, _CF_this.password, _CF_this.password.value, "Input your user password"))
		{
			return false;
		}
	}

	return true;
}

function submitForm(form, action) {
	form.action = action;
	form.submit();
}

function submitFormThin(form) {
	form.submit();
}

function ieupdate(){
 var strBrowser = navigator.userAgent.toLowerCase();
 if(strBrowser.indexOf("msie") > -1 && strBrowser.indexOf("mac") < 0){
  var theObjects = document.getElementsByTagName('object');
  var theObjectsLen = theObjects.length;
  for (var i = 0; i < theObjectsLen; i++) {
   if(theObjects[i].outerHTML){
    if(theObjects[i].data){
     theObjects[i].removeAttribute('data');
    }
    var theParams = theObjects[i].getElementsByTagName("param");
    var theParamsLength = theParams.length;
    for (var j = 0; j < theParamsLength; j++) {
      if(theParams[j].name.toLowerCase() == 'flashvars'){
        var theFlashVars = theParams[j].value;
      }
    }
    var theOuterHTML = theObjects[i].outerHTML;
    var re = /<param name="FlashVars" value="">/ig;
    theOuterHTML = theOuterHTML.replace(re,"<param name='FlashVars' value='" + theFlashVars + "'>");
    theObjects[i].outerHTML = theOuterHTML;
   }
  }
 }
}

window.onunload = function() {
 if (document.getElementsByTagName) {
  var objs = document.getElementsByTagName("object");
  for (i=0; i<objs.length; i++) {
   objs[i].outerHTML = "";
  }
 }
}