myHover = function() 
{ 
	var myEls = document.getElementById("navigation").getElementsByTagName("LI"); 
	
	if(!myEls)
		return;
	for (var i=0; i<myEls.length; i++) 
	{ 
		myEls[i].onmouseover=function() 
		{ 
			this.className+=" myhover"; 
		} 

		myEls[i].onmouseout=function() 
		{ 
			this.className=this.className.replace(new RegExp(" myhover\\b"), ""); 
		} 
	} 
}

if (window.attachEvent) window.attachEvent("onload", myHover);

myHover2 = function() 
{ 
	var myEls = document.getElementById("SideNavigation").getElementsByTagName("LI"); 
	
	if(!myEls)
		return;
	for (var i=0; i<myEls.length; i++) 
	{ 
		myEls[i].onmouseover=function() 
		{ 
			this.className+=" myhover"; 
		} 

		myEls[i].onmouseout=function() 
		{ 
			this.className=this.className.replace(new RegExp(" myhover\\b"), ""); 
		} 
	} 
}

if (window.attachEvent) window.attachEvent("onload", myHover2);

function generateClassNames() 
{
	if (document.bigimage.src == 'http://' + document.domain + '/images/layout/nophoto.gif')
	{
		document.getElementById('Photos').style.display="none"
	}
	else
	{
		var inputs = document.getElementsByTagName('div')
	   
		for (var i = 0; i < inputs.length; i++) 
		{
			var x = inputs[i];
		    
			if (x.className == "Photo") 
			{
				x.onmouseover = MouseOver
			}
		}
	}
}

var nophoto = 1

function checkPhoto(img)
{
	if (nophoto == 1)
	{
		document.bigimage.src = img
		nophoto = 0
	}
}
 
function MouseOver()
{
	var inputs = document.getElementsByTagName('div')
  
	for (var i = 0; i < inputs.length; i++) 
	{
		var x = inputs[i]

		if (x.className == "PhotoHover") 
		{
			x.className = "Photo"
		}
	}
	
	return this.className="PhotoHover"
}

function ByeByeSelect(a)
{
	var inputs = document.getElementsByTagName('select')
  
	for (var i = 0; i < inputs.length; i++) 
	{
		var x = inputs[i];
		if (x.className=="listbox")
		{
			x.style.visibility = a;
		}
	}
}

function popUp2(img,width,height) 
{
	var top = (screen.height - height) / 2;
	var left = (screen.width - width) / 2;

	day = new Date();
	id = day.getTime();
	eval("page" + " = window.open(img, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top + "');");
}

function popUp(img) 
{
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(img, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,left=100,top=150');");
}

function Print()
{
	window.print();
	window.close();
}

function clickButton(e, buttonid){ 
      var bt = document.getElementById(buttonid); 
      if (typeof bt == 'object'){ 
            if(navigator.appName.indexOf("Netscape")>(-1)){ 
                  if (e.keyCode == 13){ 
                        bt.click(); 
                        return false; 
                  } 
            } 
            if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){ 
                  if (event.keyCode == 13){ 
                        bt.click(); 
                        return false; 
                  } 
            } 
      } 
} 

function checklengthName(o)
{
	strid = 'thelength'+o.name.replace(':','_');	
	document.getElementById(strid).innerHTML =o.value.length+'<strong>/25</strong>';
}

function checklength(o)
{
	strText = o.value;
	intStart = o.value.length;

	if (intStart > 36 && strText[35] != ' ')
	{
		intStart = 35 - strText.substr(0,36).lastIndexOf(' ');
		o.maxLength = 71-intStart;
	}
	else
	{
		o.maxLength = 71;
	}
	
	if (o.value.length > o.maxLength)
	{
		o.value = o.value.substr(0,o.maxLength);
	}
	strid = 'thelength'+o.name.replace(':','_');

	document.getElementById(strid).innerHTML =o.value.length+'<strong>/'+ o.maxLength+'</strong>';
}