function Rollover(ide, source1, source2) {
	
	this.ide = ide;
	this.source1 = source1;
	this.source2 = source2;
	this.roll = roll_f;
	this.init = init_f;
	
	function roll_f() {
		var source = document.getElementById(this.ide);
		if(source.src == this.source1) {
			source.src = this.source2;
		}
		else {
			source.src = this.source1;
		}
		
	}
	
	function init_f() {
		var td1 = new Date().getTime();
		eval("var pic"+td1+" = new Image(0,0);");
		eval("pic"+td1+".src = '"+this.source1+"'");
		var td2 = new Date().getTime();
		eval("var pic"+td2+" = new Image(0,0);");
		eval("pic"+td2+".src = '"+this.source2+"'");
	}

}

function showHide(target) {
	div = document.getElementById(target);
	if(div.className == "divShown") {
		div.className = "divHidden";
	}
	else {
		div.className = "divShown";	
	}
}

function popwin(url) {

	window.open(url);
	
}

function copyright() {
	
	var cr = "This site is Copyrighted and owned by MLDetox 2006";
	alert(cr);
	
}

function createRequestObject(){
	var request_o; 
	var browser = navigator.appName; 
	if(browser == "Microsoft Internet Explorer"){
		request_o = new ActiveXObject("Microsoft.XMLHTTP");
	}else{
		request_o = new XMLHttpRequest();
	}
	return request_o; 
}
var http = createRequestObject(); 

$allow = true;

function handle(target, cline){
	
		if($allow) {
			$allow = false;
			document.getElementById(target).innerHTML = 'working....';
			http.open('get', 'classes/handle?a='+cline);
			http.onreadystatechange = function () {
				if(http.readyState == 4){
					var response = http.responseText;
					document.getElementById(target).innerHTML = response;		
					$allow = true;
					
				}
			}
			http.send(null);
		}
		else {
			document.getElementById(target).innerHTML = "an error occured, please try again";;
		}
}