/* ------------------------------------------------------------------------------ */
	/*
	
		project:				Project_Title
		file: 					common.js
		creator:				Creator_Info
		creation date:	2007-01-07
		copyright:			(c) 2007 __Company_Name__. All rights reserved.
	
	*/
/* ------------------------------------------------------------------------------ */

/* ------------------------------------------------------------------------------ */
	/*
	
		File Layout
		
		1.0 addEvent
		2.0 getElementsByClass
		3.0 Toggle
		4.0 Cookies
		5.0 getElement
		6.0 Misc
		
	*/
/* ------------------------------------------------------------------------------ */

/* =popup config
   ------------------------------------------------------------------------ */
		var popupLinkConfig = new Array;

		// popupLinkConfig["classname"] = new Array ( "targetname", "width=550,height=350,scrollbars=yes,resizable=yes,status=yes,toolbar=yes,location=yes,menubar=yes");
		popupLinkConfig["helpPop"]    = new Array ( "help", "width=620,height=400,resizeable=yes,scrollbars=yes");
		popupLinkConfig["fullpop"] = new Array ( "_blank", "scrollbars=yes,resizable=yes,status=yes,toolbar=yes,location=yes,menubar=yes");
		popupLinkConfig["videopop"]    = new Array ( "video", "width=320,height=282");




		function initPage() {
		  initPopupLinks();
		  // place here any other code you wish to run when the page loads.
		}

		function initPopupLinks()
		{
		  if (!document.getElementsByTagName) return true;
		  var pageLinks = document.getElementsByTagName("a");
		  for (var i = 0; i < pageLinks.length; i++) 
		  {
		    if (((pageLinks[i].className != null) && 
		         (pageLinks[i].className != "")) ||
		        ((pageLinks[i].parentNode.className != null) && 
		         (pageLinks[i].parentNode.className != "")))
		    {
		      var linkClass = " " + pageLinks[i].className + " ";
		      if ((linkClass == "  ") && (pageLinks[i].parentNode.className != ""))
		      {
		        linkClass = " " + pageLinks[i].parentNode.className + " ";
		      }
		      for (var theKey in popupLinkConfig) 
		      {
		        if (linkClass.indexOf(" " + theKey + " ") > -1)
		        {
		          if ((pageLinks[i].target == "") || (pageLinks[i].target == null))
		          {
		            pageLinks[i].target = (popupLinkConfig[theKey][0] != "") ? popupLinkConfig[theKey][0] : theKey;
		          }
		          pageLinks[i].settings = popupLinkConfig[theKey][1];
		          pageLinks[i].onclick = popUp;
		        }
		      }
		    }
		  }
		  return true;
		}

		function popUp()
		{
		  newWin = window.open(this.href, this.target, this.settings);
		  newWin.focus();
		  return false;
		}
		
		// addEvent(window,'load',initPage);
/* =popup config end
   ------------------------------------------------------------------------ */
	
