<!--

function resize_iframe()
{

	var height=window.innerWidth;//Firefox
	if (document.body.clientHeight)
	{
		height=document.body.clientHeight;//IE
	}
	//resize the iframe according to the size of the
	//window (all these should be on the same line)
	document.getElementById("targetArea").style.height=parseInt(height- document.getElementById("targetArea").offsetTop)+"px";
}

// this will resize the iframe every
// time you change the size of the window.
window.onresize=resize_iframe; 




function gotoUrl(thelink) {
window.location.href = thelink;
}


function loadFrame(url) {
	var loc =url.substring(2);	
	var prfx =url.substring(0,1);
	if (prfx == "#") {
		if (isNaN(loc)){
		frames['main'].location.href = loc;
		}
	}
	else {
		return false;
	}
}


function changeStat(obj) {

var nr = 'mnu' + obj;

			var as;
			as=document.getElementsByTagName('div');
			for(i=0;i<as.length;i++)
			{
			if (document.all && /MSIE (5\.5|6|7)/.test(navigator.userAgent)){ var cl = as[i].getAttribute('className'); }
			else { var cl = as[i].getAttribute('class'); }
			var target = as[i].getAttribute('id')
			
				if(target==nr) {
					
						if (document.all && /MSIE (5\.5|6)/.test(navigator.userAgent)) {
						as[i].style.backgroundPosition = "20px -45px";
						//as[i].style.marginLeft="10px";
						}
						else {
						as[i].style.backgroundPosition = "0 -45px";
						//as[i].style.marginLeft="20px";
						}
						smp = obj;

							}
				else  {			
							if (cl == 'mnu') {
								
							if (document.all && /MSIE (5\.5|6)/.test(navigator.userAgent)) {
							as[i].style.backgroundPosition = "20px 0";
							//as[i].style.marginLeft="0px";
							}
							else {
							as[i].style.backgroundPosition = "0px 0";
							//as[i].style.marginLeft="0px"
							}
							}
					  }
			}

}	

function changeSub(obj) {

var nr = 'sub' + obj;

			var as;
			as=document.getElementsByTagName('div');
			for(i=0;i<as.length;i++)
			{
			if (document.all && /MSIE (5\.5|6|7)/.test(navigator.userAgent)){ var cl = as[i].getAttribute('className'); }
			else { var cl = as[i].getAttribute('class'); }
			var target = as[i].getAttribute('id')
			
				if(target==nr) {
					
						if (document.all && /MSIE (5\.5|6)/.test(navigator.userAgent)) {
						as[i].style.backgroundPosition = "20px -45px";
						//as[i].style.marginLeft="10px";
						}
						else {
						as[i].style.backgroundPosition = "0 -45px";
						//as[i].style.marginLeft="20px";
						}
						su = obj;

							}
				else  {			
							if (cl == 'sub') {
								
							if (document.all && /MSIE (5\.5|6)/.test(navigator.userAgent)) {
							as[i].style.backgroundPosition = "20px 0";
							//as[i].style.marginLeft="0px";
							}
							else {
							as[i].style.backgroundPosition = "0px 0";
							//as[i].style.marginLeft="0px"
							}
							}
					  }
			}

}	

smp = 1;
function on (i) {
	
	if (smp != i) {
		var m = document.getElementById('mnu' + i).style;
		if (document.all && /MSIE (5\.5|6)/.test(navigator.userAgent)) {
		m.backgroundPosition = "20px -45px";
		}
		else {
		m.backgroundPosition = "0px -45px";

		}
	}
}


function off (i) {
	if (smp != i) {
		var m = document.getElementById('mnu' + i).style;
		if (document.all && /MSIE (5\.5|6)/.test(navigator.userAgent)) {
		m.backgroundPosition = "20px 0";
		}
		else {
		m.backgroundPosition = "0 0";

		}
	}
}

su = 1;
function subon (i) {
	
	if (su != i) {
		var m = document.getElementById('sub' + i).style;
		if (document.all && /MSIE (5\.5|6)/.test(navigator.userAgent)) {
		m.backgroundPosition = "20px -45";
		}
		else {
		m.backgroundPosition = "0px -45";

		}
	}
}


function suboff (i) {
	if (su != i) {
		
		var m = document.getElementById('sub' + i).style;
		if (document.all && /MSIE (5\.5|6)/.test(navigator.userAgent)) {
		m.backgroundPosition = "20px 0";
		}
		else {
		m.backgroundPosition = "0 0";

		}
	}
}


function MenuStatus() {
					
var m = document.getElementById('mnu1').style;
if (document.all && /MSIE (5\.5|6)/.test(navigator.userAgent)) {
				//m.marginLeft="10px";
				m.backgroundPosition = "20px 0";
}
else {
				//m.marginLeft="20px";
				m.backgroundPosition = "0 -45px";
	

}
}

