var imgNames = ["armentel", "arminco","netsys","web","xternet","alexserv","cornet","icon_internet","icon_ip","img_ip_pc","img_ip_phone","icon_mobile","icon_game","intertel","dolphin","HiTech","harknet","casino","bionet","skype","vivacell", "fastnet", "cascade_tel", "karginkap", "beeline", "norq", "Radionet", "kadaphone", "haytelecom_01","unitel"];
var imgArray = new Array();
for(var i=0; i<imgNames.length;i++)
{
	imgArray[imgNames[i]] = new Image();
	imgArray[imgNames[i]].src = "../Images/icon/"+imgNames[i]+".gif"
	imgArray[imgNames[i]+"_on"] = new Image();
	imgArray[imgNames[i]+"_on"].src = "../Images/icon/"+imgNames[i]+"_on.gif"
}

function swapImg(name,on_of)
{
		
		document.images[name].src = imgArray[name+on_of].src;
}

function MenuIconChange(flag, idx, child)
{
	getObj("img_"+idx).src = swapImg[((child)?"but":idx)+((flag)?"_on":"_off")].src;
}

function MenuOpenClose(idx)
{
	getObj("_ctl0_parent_"+idx).style.display = (getObj("_ctl0_parent_"+idx).style.display=="")?"none":"";
}

function getObj(sID)
{
	return document.getElementById(sID)
}



function ShowPopup(popupName, params, wndName, resizable, scrollbars, func)
{
    ReturnPopup = func;
    var wnd,wndWidh=410,wndHeight=500;
    wndX=Math.round((screen.width - wndWidh)/2); wndX=(wndX<0)?0:wndX;
    wndY=Math.round((screen.height - wndHeight)/2); wndY=(wndY<20)?0:wndY-20;
    wnd=open("", wndName, 'status=no,width='+wndWidh+',height='+wndHeight+',resizable='+resizable+',screenX='+wndX+',screenY='+wndY+',top='+wndY+',left='+wndX+',scrollbars='+scrollbars);
    var sTitle = window.document.title
    with(wnd.document)
    {
        open()
        writeln("<html>");
        writeln("   <head>");
        writeln("   <title>"+sTitle+"</title>");
        writeln("   </head>");
        writeln("   <body bgcolor=#ffffff>");
        writeln("<div style='color:#000000;font-family: Arial,Verdana;font-weight: 900;font-size: 18px;'>Loading ...</div>");
        writeln("");
        writeln("   </body>");
        writeln("</html>");
        close();
    }
    wnd.location.href = "http://chat.edram.am/login.aspx?rnd="+ Math.random()+ "&Referer=" + document.location.href;
    wnd.focus();
}
