﻿// -- Browser detection --

var is_DOM = document.getElementById?1:0;

var is_IE  = document.all?1:0;

var is_NS4 = (navigator.appName=='Netscape' && !is_DOM)?1:0;

var is_IE4 = (is_IE && !is_DOM)?1:0;

var is_Dyn = (is_DOM||is_IE4||is_NS4);



// -- Return object reference --

function findObject(id) {

  d = document;

  return (is_IE ? d.all[id] : (is_DOM ? d.getElementById(id) : d.layers[id]));

}



function ShowLayer(x)

{

	for (i=1;i<=10;i++)

	{

		if (x!=i) 

		{

			//findObject('Content'+i).className = 'dHide';

			findObject('Content'+i).className = 'dHide';

		}

		else

		{

			findObject('Content'+i).className = 'dShow';

			findObject('img'+i).src = 'images/nav_' + i + '_o.gif';

		}

	}

}



function  ChangeImage(x)

{

	findObject('img'+x).src = 'images/nav_' + x + '.gif';

}



//=====================================================================

//  DOM Image Rollover v3 (hover)

//

//  Demo: http://chrispoole.com/scripts/dom_image_rollover_hover

//  Script featured on: Dynamic Drive (http://www.dynamicdrive.com)

//=====================================================================

//  copyright Chris Poole

//  http://chrispoole.com

//  This software is licensed under the MIT License 

//  <http://opensource.org/licenses/mit-license.php>

//=====================================================================



function domRollover() {

	if (navigator.userAgent.match(/Opera (\S+)/)) {

		var operaVersion = parseInt(navigator.userAgent.match(/Opera (\S+)/)[1]);

	}

	if (!document.getElementById||operaVersion <7) return;

	var imgarr=document.getElementsByTagName('img');

	var imgPreload=new Array();

	var imgSrc=new Array();

	var imgClass=new Array();

	var mID = 0;

	for (i=0;i<imgarr.length;i++){

		if (imgarr[i].className.indexOf('domroll')!=-1){

			imgSrc[i]=imgarr[i].getAttribute('src');

			imgClass[i]=imgarr[i].className;

			imgPreload[i]=new Image();

			

			

			if (imgClass[i].match(/domroll (\S+)/)) {

				imgPreload[i].src = imgClass[i].match(/domroll (\S+)/)[1]

			}

			imgarr[i].setAttribute('xsrc', imgSrc[i]);

			imgarr[i].onmouseover=function(){

				this.setAttribute('src',this.className.match(/domroll (\S+)/)[1]);

			}

			imgarr[i].onmouseout=function(){

				this.setAttribute('src',this.getAttribute('xsrc'))

			}

		}

	}

}

//domRollover();