// 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, "popup_content", "width=425,height=350,scrollbars=yes,resizable=yes");	
	}
	
function popUp3(winURL)
	{
		window.open(winURL, "popUp3", "width=216,height=216,scrollbars=yes,resizable=yes");	
	}
	
function popUp4(winURL)
	{
		window.open(winURL, "popUp4", "width=288,height=288,scrollbars=yes,resizable=yes");	
	}
	
function popUp5(winURL)
	{
		window.open(winURL, "popUp5", "width=360,height=360,scrollbars=yes,resizable=yes");	
	}
	
function popUp6(winURL)
	{
		window.open(winURL, "popUp6", "width=432,height=360,scrollbars=yes,resizable=yes");	
	}
	
function popUp7(winURL)
	{
		window.open(winURL, "popUp7", "width=504,height=432,scrollbars=yes,resizable=yes");	
	}
	
function popUp8(winURL)
	{
		window.open(winURL, "popUp8", "width=576,height=504,scrollbars=yes,resizable=yes");	
	}
	
function popUp9(winURL)
	{
		window.open(winURL, "popUp9", "width=648,height=576,scrollbars=yes,resizable=yes");	
	}
	
	//PopUp (3\"x3\")=popUp3;Links: PopUp (4\"x4\")=popUp4;Links: PopUp (5\"x5\")=popUp5;Links: PopUp (6\"x5\")=popUp6;Links: PopUp (7\"x6\")=popUp7;Links: PopUp (8\"x7\")=popUp8;Links: PopUp (9\"x8\")=popUp9
	
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;
							}
					}
				else if(lnks[i].className == "popup_content")
					{
						lnks[i].onclick = function()
							{
								popUp2(this.getAttribute("href"));
								return false;
							}
					}
				else if(lnks[i].className == "popup3")
					{
						lnks[i].onclick = function()
							{
								popUp3(this.getAttribute("href"));
								return false;
							}
					}
				else if(lnks[i].className == "popup4")
					{
						lnks[i].onclick = function()
							{
								popUp4(this.getAttribute("href"));
								return false;
							}
					}
				else if(lnks[i].className == "popup5")
					{
						lnks[i].onclick = function()
							{
								popUp5(this.getAttribute("href"));
								return false;
							}
					}
				else if(lnks[i].className == "popup6")
					{
						lnks[i].onclick = function()
							{
								popUp6(this.getAttribute("href"));
								return false;
							}
					}
				else if(lnks[i].className == "popup7")
					{
						lnks[i].onclick = function()
							{
								popUp7(this.getAttribute("href"));
								return false;
							}
					}
					
				else if(lnks[i].className == "popup8")
					{
						lnks[i].onclick = function()
							{
								popUp8(this.getAttribute("href"));
								return false;
							}
					}
					
				if(lnks[i].className == "popup9")
					{
						lnks[i].onclick = function()
							{
								popUp9(this.getAttribute("href"));
								return false;
							}
					}
			}
		
	}
	
function clearDefault(el) {
if (el.defaultValue==el.value) el.value = ""
}
	
// END FOR POPUP WINDOWS - NEW WINDOW
//************************************************************

//************************************************************
// FOR SUCKERFISH DROPDOWNS
// Dropdowns will not work in IE 6 without these



// 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);
