function changePage(newLoc)
{
	nextPage = newLoc.options[newLoc.selectedIndex].value
	if (nextPage != "")
	{
		document.location.href = nextPage
	}
}
function gmap(latitude,longitude)
{
	alert(latitude);
	alert(longitude);
}
function getexpirydate( nodays)
{
	var UTCstring;
	Today = new Date();
	nomilli=Date.parse(Today);
	Today.setTime(nomilli+nodays*24*60*60*1000);
	UTCstring = Today.toUTCString();
	return UTCstring;
}
function GetCookie(cookiename)
{
	getcookie(cookiename)
}
function SetCookie(name,value,duration)
{
	setcookie(name,value,duration)
}
function getcookie(cookiename) 
{
	var cookiestring=""+document.cookie;
 	var index1=cookiestring.indexOf(cookiename);
 	if (index1==-1 || cookiename=="") return ""; 
 	var index2=cookiestring.indexOf(';',index1);
 	if (index2==-1) index2=cookiestring.length; 
 	return unescape(cookiestring.substring(index1+cookiename.length+1,index2));
}
function setcookie(name,value,duration)
{
	cookiestring=name+"="+escape(value)+";EXPIRES="+getexpirydate(duration);
	document.cookie=cookiestring;
	if(!getcookie(name))
	{
		return false;
	}
	else
	{
		return true;
	}
}
function markAllRows( container_id ) 
{
	var rows = document.getElementById(container_id).getElementsByTagName('div');
   var unique_id;
   var checkbox;

   for ( var i = 0; i < rows.length; i++ ) 
	{
      checkbox = rows[i].getElementsByTagName( 'input' )[0];
      if( checkbox && checkbox.type == 'checkbox' ) 
		{
      	unique_id = checkbox.name + checkbox.value;
         if(checkbox.disabled==false) 
			{
         	checkbox.checked = true;
         }
     }
  }
  return true;
}
function unmarkAllRows( container_id ) 
{
	var rows = document.getElementById(container_id).getElementsByTagName('div');
   var unique_id;
   var checkbox;

   for ( var i = 0; i < rows.length; i++ ) 
	{
      checkbox = rows[i].getElementsByTagName( 'input' )[0];
      if( checkbox && checkbox.type == 'checkbox' ) 
		{
      	unique_id = checkbox.name + checkbox.value;
         if(checkbox.checked==true) 
			{
         	checkbox.checked = false;
         }
     }
  }
  return true;
}
