﻿// JavaScript Document
function killErrors() {
return true;
}
function no_oncontextmenu(){
	event.cancelBubble = true;
	window.event.returnValue=false;
}
function no_onselectstart(){
	window.event.returnValue=false;
}
function no_ondragstart(){
	window.event.returnValue=false;
}
function no_onsource(){
	window.event.returnValue=false;
}

//window.onerror = killErrors;
//document.oncontextmenu = no_oncontextmenu;
//document.onselectstart = no_onselectstart;
//document.ondragstart = no_ondragstart;
document.onsource = no_onsource;
function $(o){
	return document.getElementById(o);	
}
function lossfocus()
{
	var alist = document.getElementsByTagName('a');	
	for(i=0; i<alist.length; i++)
	{
		alist[i].onfocus = function(){
			this.blur();
		}
	}
}


function swapstyle(num){
	//alert(num);
	var swapcontain = document.getElementById('mainmenu').getElementsByTagName('a');//
	//alert(swapcontain.length);
	var j = swapcontain.length;
	for(i=0; i<j; i++){
		//alert(swapcontain[i].className);
		swapcontain[i].className = 'l1';
	}
	swapcontain[num].className = 'l2';
}

try {
document.execCommand('BackgroundImageCache', false, true);
}
catch(e) {}


function swapdisplay(o){
	if($(o)){
		if($(o).style.display == 'none'){
			$(o).style.display = 'block';
		}else{
			$(o).style.display = 'none';
		}
		return false;	
	}
}


