function set_item_selected(item)
{
	document.getElementById(item).className="selected"	
}
function set_sub_selected(item)
{
	document.getElementById(item).className="subselected"	
}
function display_tile(tile_id,width,height)
{
width = width + 50;
height = height + 200;
tileWindow = window.open('tiledownload.php?Id='+tile_id,'Tile','width='+width+',height='+height)
tileWindow.focus()

}
function printpage()
  {
  window.print()
  }
  
function goBack()
  {
  window.history.back()
  }
 
 function validateUrl(tileUrl)
	{
	with (tileUrl)
	//get the string length
	thisValue = value
	dotpos=thisValue.lastIndexOf(".");
	strLength = thisValue.length;
	if (strLength - dotpos != 4)
		{
		alert(  "please enter a valid url");
		//document.getElementById(tileUrl).focus();
		return false;
		}
	filext = thisValue.substr(dotpos+1,3).toLowerCase();
	if (filext != "jpg" && filext != "png" && filext != "gif")
		{
		alert("Please enter a url for an image file. Acceptable formats are .jpg, .gif, and .png");
		//document.getElementById(tileUrl).focus();
		return false;
		}
	}
