//function to change page from option list
function linkURL(URL) {
	if (URL.options[URL.selectedIndex].value != "") self.location.href = URL.options[URL.selectedIndex].value;	
	return true;
}

//function to open pop up window
function winOpener(theURL, winName, scrollbars, resizable, width, height) {

	winFeatures = 'left=' + (screen.availWidth-10-width)/2 + ',top=' + (screen.availHeight-30-height)/2 + ',scrollbars=' + scrollbars + ',resizable=' + resizable + ',width=' + width + ',height=' + height + ',toolbar=0,location=0,status=1,menubar=0'
  	window.open(theURL, winName, winFeatures);
}




function showhide(id){
window.focus();

	if (document.getElementById){
		obj = document.getElementById(id);
	if (obj.style.display == "none"){
		obj.style.display = "";
	}
	else{
		obj.style.display = "none";
	}
	}
}

function show(id){
	if (document.getElementById){
		obj = document.getElementById(id);
	if (obj.style.display == "none"){
		obj.style.display = "";
	}
	}
}

function hide(id){
	if (document.getElementById){
		obj = document.getElementById(id);
	if (obj.style.display == ""){
		obj.style.display = "none";
	}
	}
}

function geturlparameter(name)
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
	return "";
  else
	return results[1];
}

function isNumberKey(evt)
      {
         var charCode = (evt.which) ? evt.which : event.keyCode
         if (charCode > 31 && (charCode < 48 || charCode > 57))
            return false;

         return true;
      }




//Select all text in textbox
function selectAll(theField) {
  var tempval=eval("document."+theField)
  tempval.focus()
  tempval.select()
}