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';
}
function ShowHelp( psFile ) { 
window.open('' + psFile,'ShowHelp','toolbar=0,width=400,height=400,resizable=yes,scrollbars=yes');
} 
function ShowPreviewPopUp( psFile ) { 
if (psFile.length > 0) { 
window.open('APPreviewLinkImage.asp?IMG=' + escape(psFile),'ImagePreview','toolbar=0,width=" & giHelpWindowWidth & ",height=" & giHelpWindowHeight & ",resizable=yes,scrollbars=yes');
}}
function openwin(uid)
{
var sFeatures, h, w, myThanks, i, page
page = 'fpuserdetails.asp?userid='+ uid;
h = window.screen.availHeight 
w = window.screen.availWidth 
sFeatures = "height= 575"   + ",width= 650"  + ",top= 5" +  ",left= 25" + ",resizable=no,scrollbars=yes"
myThanks = window.open(page,"",sFeatures)
}
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];
}
