// link target blank
function external() {
	if (document.getElementsByTagName) {
 		var i, mylink;
  		mylink = document.getElementsByTagName('a');
  		for (i in mylink) {
   			if (mylink[i].href && mylink[i].rel == 'external') mylink[i].target = '_blank';
  		}
 	}
}

var windowedElementList = ["object","applet","embed","select","textarea"];

var activeScrollTimer = -1;
function hideWindowedElements () {
	var count = windowedElementList.length;
	for (var i=0; i<count; i++) {
		var elems = document.getElementsByTagName(windowedElementList[i]);
		var count2 = elems.length;
		for (var a=0; a<count2; a++) {
			if (!(windowedElementList[i] == 'object' && elems[a].type && elems[a].type == 'application/x-shockwave-flash')) {
				elems[a].style.visibility = 'hidden';
			}
		}
	}
}

function showWindowedElements () {
	var count = windowedElementList.length;
	for (var i=0; i<count; i++) {
		var elems = document.getElementsByTagName(windowedElementList[i]);
		var count2 = elems.length;
		for (var a=0; a<count2; a++) {
			if (!(windowedElementList[i] == 'object' && elems[a].type && elems[a].type == 'application/x-shockwave-flash')) {
				elems[a].style.visibility = 'visible';
			}
		}
	}
}

function checkScrollTimer () {
	if (activeScrollTimer >= 5) {
		showWindowedElements();
		activeScrollTimer = -1;
		window.clearInterval(scrollInterval);
	} else {
		activeScrollTimer++;
	}
}

function setScrollTimer () {
	if (activeScrollTimer == -1) {
		hideWindowedElements();
		activeScrollTimer++;
		scrollInterval = window.setInterval('checkScrollTimer()', 100);
	} else {
		activeScrollTimer = 0;
	}
}

function windowedElements() {
	if (
		document.getElementsByTagName("object").length || 
		document.getElementsByTagName("applet").length || 
		document.getElementsByTagName("embed").length || 
		document.getElementsByTagName("select").length || 
		document.getElementsByTagName("textarea").length
	) {
		return true;
	} else {
		return false;
	}
}


window.onload = function() {
	if (document.all && windowedElements()) {
		document.body.onscroll = setScrollTimer;
		external();
	}
}


if (document.all) {
	document.write('<iframe frameborder="0" scrolling="no" id="headerframe"></iframe><iframe frameborder="0" scrolling="no" id="footerframe"></iframe>');
}