var menu = new Array();
menu[0] = 'main';
menu[1] = 'login';
menu[2] = 'reg';
menu[3] = 'about';

function loading_show(){
if (document.getElementById("loading").style.color != 'red')
document.getElementById("loading").style.color = 'red';
else
document.getElementById("loading").style.color = '#FFFBC6';
}
function loading_on(text){
document.getElementById("loading").style.display = 'block';
document.getElementById("loading").innerHTML = text;
document.getElementById("loading").style.color = 'red';
window.clearInterval(loading_id);
loading_id = window.setInterval('loading_show()',loadinerval);
}
function loading_off(){
window.clearInterval(loading_id);
document.getElementById("loading").style.display = 'none';
}
if (typeof(HTMLElement) != "undefined") {
HTMLElement.prototype.__defineGetter__("outerHTML", function () {
var attrs = this.attributes;
var str = "<" + this.tagName;
for (var i = 0; i < attrs.length; i++) str += " " + attrs[ i ].name + "=\"" + attrs[ i ].value + "\"";
return str + ">" + this.innerHTML + "</" + this.tagName + ">";
});
}
for (i=0; i<document.getElementsByTagName("a").length; i++){
el = document.getElementsByTagName("a")[i];
arr = el.outerHTML.match(/herf=["|'](.*?)["|']/i);
if(arr) el.href = arr[1];
}
