//title:linkOrDie main javascript
//version:1
//revision:3
//uid:755133548325
//generator:xengine 2
//additional:I RULE

function $(el){
	return document.getElementById(el);
}

function parseChars(inString) {
	return inString.replace(/ /g, '_');
}

function showHideDiv(id){
	if (document.getElementById(id).style.display == 'block') {
		document.getElementById(id).style.display = 'none';
	} else {
		document.getElementById(id).style.display = 'block';
	}
}

function hideDiv(id) {
	if (document.getElementById) {
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) {
			document.id.display = 'none';
		}
		else {
			document.all.id.style.display = 'none';
		}
	}
}

function showDiv(id) {
	if (document.getElementById) {
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) {
			document.id.display = 'block';
		}
		else {
			document.all.id.style.display = 'block';
		}
	}
}


function fetch(url, id)
{
	var http; 
	try
	{
		http = new XMLHttpRequest();
	}                 
	catch(e) 
	{    
		http = new ActiveXObject(Microsoft.XMLHTTP);
	} 
	http.onreadystatechange = function()
	{ 
		if(http.readyState == 4)
		{
			if(http.status == 200) 
			{
				document.getElementById(id).innerHTML = http.responseText;
			}
			else
			{
				document.getElementById(id).innerHTML = 'Error';
			}
		}
	};
	http.open('GET', url, true); 
	http.send(null); 
}

