// JavaScript Document
// !!!! Be Careful here. If this is a mistake in this file IE 6 png transparency will not work.

//************************************************************
// LOADS THE NECESSARY FUNCTIONS FOR SITE
function addLoadEvent(func)
	{
		var oldonload = window.onload;
		if (typeof window.onload != 'function')
			{
				window.onload = func;
			}
		else
			{
				window.onload = function()
					{
						oldonload();
						func();
					}
			}
	}
	
// END LOADS THE NECESSARY FUNCTIONS FOR SITE
//************************************************************

//************************************************************
// FOR POPUP WINDOWS - NEW WINDOW
// add 'class="popup"' to any link that you want to open in a new window

function popUp(winURL)
	{
		window.open(winURL, "popup");	
	}
	
function popUp2(winURL)
	{
		window.open(winURL, "admin_notes_popup", "width=500,height=600,resizable=yes,scrollbars=yes");	
	}
	
function popUp3(winURL)
	{
		window.open(winURL, "esther_popup", "width=550,height=775,resizable=yes,scrollbars=yes");	
	}
	
function openNewWindow() 
	{
		if (!document.getElementsByTagName) return false;
		var lnks = document.getElementsByTagName("a");
		for (var i=1; i<lnks.length; i++) 
			{
				if(lnks[i].className == "popup")
					{
						lnks[i].onclick = function()
							{
								popUp(this.getAttribute("href"));
								return false;
							}
					}
				if(lnks[i].className == "admin_notes_popup")
					{
						lnks[i].onclick = function()
							{
								popUp2(this.getAttribute("href"));
								return false;
							}
					}
					
				if(lnks[i].className == "esther_popup")
					{
						lnks[i].onclick = function()
							{
								popUp3(this.getAttribute("href"));
								return false;
							}
					}
			}
		
	}
	
  

      
	

//************************************************************
// load the functions
// !!!! Be Careful here. If this is a mistake in the file IE 6 png transparency will not work.
// dont list a function here that is not being used.
addLoadEvent(openNewWindow);
//addLoadEvent(startList);