// JavaScript Document
function reset_form(page_id){
	top.location.href = "?page_id=" + page_id;
	//window.location = "index.php";
}
function chkEmail(strEmail){
	if(!/^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/.test(strEmail)) {
		return true;
	} else return false;
}

function trim(str)
{
	var len,loop,start=0,end;
	len=str.length;
	for(loop=0;loop<len;loop++)
	{
		if(str.charAt(loop)==" " || str.charAt(loop)==" ") 
			start=loop+1;
		else 
			break;
	}
	end=len;
	for(loop=len-1;loop>=0;loop--)
	{
		if(str.charAt(loop)==" " || str.charAt(loop)==" ") 
			end=loop;
		else 
			break;
	}
	if(start>len-1) 
		return "";
	else
	{
		if(end<0) 
			return "";
		else 
			return(str.substring(start,end));
	}
}
  function toggle_it(itemID){ 
      // Toggle visibility between none and inline 
      if ((document.getElementById(itemID).style.display == 'none')) 
      { 
        document.getElementById(itemID).style.display = 'inline'; 
      } else { 
        document.getElementById(itemID).style.display = 'none'; 
      } 
  } 
