function ro(tdId){
	document.getElementById(tdId).className = 'mm_ro';
}

function rn(tdId){
	document.getElementById(tdId).className = 'none';
}

function popup(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

prev = '';

function abc(abcid,targ,lang){
	elm = document.getElementById(targ);
	if(prev != ''){
		prev.style.display = 'none';
	}
	elm.innerHTML = '<img src="/images/loading.gif" alt="loading"/>';
	ajaxpage('/pages/abcinfo.php?abc='+ abcid +'&lang='+ lang +'&targ='+ targ,targ);
	elm.style.display = 'block';
	prev = elm;
	return false;
}

function openDiv(){
	//document.getElementById('ppd').style.display = 'block';
}

function closeDiv(){
	//document.getElementById('ppd').style.display = 'none';
}

var bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)
var loadedobjects=""
var bustcacheparameter=""

function ajaxpage(url, containerid){
	var page_request = false
	if (window.XMLHttpRequest){ // if Mozilla, Safari etc
		page_request = new XMLHttpRequest()
	}else if(window.ActiveXObject){ // if IE
		try {
			page_request = new ActiveXObject("Msxml2.XMLHTTP");
		} 
		catch (e){
			try{
				page_request = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e){}
		}
	}else{
		return false;
	}
	page_request.onreadystatechange=function(){
		loadpage(page_request, containerid)
	}
	if (bustcachevar) //if bust caching of external page
	bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
	page_request.open('GET', url+bustcacheparameter, true)
	page_request.send(null)
}

function loadpage(page_request, containerid){
	if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)){
		document.getElementById(containerid).innerHTML=page_request.responseText;
	}
}