// home page javascript
function init_ie6_fixes(){
	if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent)) return;
	else if (document.all && document.getElementById && document.styleSheets && document.styleSheets[0] && document.styleSheets[0].addRule){
		// add hover pseudo class to <li>
		navRoot = document.getElementById("navigation");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					curCname = this.className;
					this.className="over";
				}
				node.onmouseout=function() {
					if(!curCname) {
							this.className=this.className.replace("over","");
					}
					else {
						//alert(curCname);
						this.className=this.className.replace("over",curCname);
					}
				}
			}
		}
		// add png transparency fix
		document.styleSheets[0].addRule('img', 'behavior: url(../../includes/js/iepngfix.htc)');
		// add fixed position fix
		include_dom('../../includes/js/ie6.js');
	}
}

function include_dom(script_filename) {
    var html_doc = document.getElementsByTagName('head').item(0);
    var js = document.createElement('script');
    js.setAttribute('language', 'javascript');
    js.setAttribute('type', 'text/javascript');
    js.setAttribute('src', script_filename);
    html_doc.appendChild(js);
    return false;
}

function openPopup(flg){
	if(!flg){
		include_dom('../../includes/js/jquery.js');
		setTimeout("openPopup(1)",200);
	}
	else{
		$('#legal').show('slow');
	}
}

function fadePopup(){
	$('#legal').hide('slow');
}

function set_plos() {
	window.onload = plos_go;
}

function plos_go() {
	for(var i = 0;i < plos.length;i++)
		eval(plos[i]);
}

function plo_add(jso) {
	plos[plos.length] = jso;
}

var plos = new Array();
plo_add("init_ie6_fixes()");
