/************************************************
  
    Site Name: 
	Description: common script
	Version: 
	Author: 
	Last Modified :

************************************************/


////////////////////////////////////////////////////////////////////////////////////////////////////
///	smartRollover
////////////////////////////////////////////////////////////////////////////////////////////////////
function smartRollover()
{
	if(document.getElementsByTagName)
	{
		var images = document.getElementsByTagName("input");

		for(var i=0; i < images.length; i++)
		{
			var elm = images[i];
			
			if(elm.type.toLowerCase() != 'image')
				continue;
			
			if(elm.getAttribute("src").match("_off."))
			{
				elm.onmouseover = function()
				{
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				
				elm.onmouseout = function()
				{
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}

////////////////////////////////////////////////////////////////////////////////////////////////////
///	smartRollover2
////////////////////////////////////////////////////////////////////////////////////////////////////
function smartRollover2()
{
	if(document.getElementsByTagName)
	{
		var images = document.getElementsByTagName("img");

		for(var i=0; i < images.length; i++)
		{
			var elm = images[i];
			
			if(elm.getAttribute("src").match("_off."))
			{
				elm.onmouseover = function()
				{
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				
				elm.onmouseout = function()
				{
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}


if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
	window.addEventListener("load", smartRollover2, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
	window.attachEvent("onload", smartRollover2);
}