function retitle(strTitle)
{
  document.title = strTitle;
}

function checkEmail(myForm,strWarning) {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.emailAdd.value)){
return (true)
}
alert(strWarning)
return (false)
}

function checkRequired(myForm,strWarning) {
//add the word "txt_required" to each required field's name and your visitor must fill it out to submit the form.
  var pass=true;
  for (i=0;i<myForm.length;i++) {
    var tempobj=myForm.elements[i];
    if (tempobj.name.substring(0,12)=="txt_required") {
      if (((tempobj.type=="text"||tempobj.type=="textarea")&&
          tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
          tempobj.selectedIndex==0)) {
        pass=false;
        break;
      }
    }
  }
  if (!pass) {
    alert(strWarning);
    return false;
  } else {
  return true;
  }
}

function addFavorite()
{
	//window.external.AddFavorite('http://www.rice-power.com','rice power');
	if (document.all)
	window.external.AddFavorite("http://www.rice-power.com", "rice power"); 
	else if (window.sidebar)
	window.sidebar.addPanel("rice power", "http://www.rice-power.com", "");
}

function clearEmail()
{
	var clicked="N";
	if(clicked="N")
	{
		frmEmailAdd.emailAdd.value = "";
		clicked="Y";
	}
}

function MM_jumpMenu(targ,selObj,restore)
{
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function openNewWin(theURL,winName,features)
{
window.open(theURL,winName,features);
}
