<!-- //
//***** WRITTEN BY S.BADRAL *****//

function NameStr(stname,stdata,topi,lefti,widthi,heighti)
{ 
if (document.layers) { 
document.write("<layer name="+stname+" width="+widthi+" top="+topi+" left="+lefti+" bgcolor=#99AAFF visibility='hide' onmouseout=hide('"+stname+"'); onmouseover=show('"+stname+"');> <font color=#00FF00>"+stdata+"</font></layer>");
		}
else if (document.all){
document.write("<div id="+stname+" style='position:absolute; top:"+topi+"px; left:"+lefti+"px; width:"+widthi+"px; height:"+heighti+"px; color:#000000;background-color:#EEEEEE; visibility=hidden; text-decoration:none;border:1px solid black;' onmouseout=hide('"+stname+"'); onmouseover=show('"+stname+"') >"+stdata+"</div>");
		}
else if (document.getElementById && !document.all)
                {
document.write("<div id="+stname+" style='position:absolute; top:"+topi+"px; left:"+lefti+"px;width:"+widthi+"px; height:"+heighti+"px;color:#000000;background-color:#EEEEEE;visibility=hidden;text-decoration:none;border:1px solid black;' onmouseout=hide('"+stname+"'); onmouseover=show('"+stname+"');>"+stdata+"</div>");
		}
}

function hide(str)
{
if (document.layers){
		document.layers[str].visibility = "hide";
		}
else if (document.all){
		obj = document.all.tags("div")[str];
		obj.style.visibility = "hidden";
		}
else if (document.getElementById && !document.all) {
		document.getElementById(str).style.visibility = "hidden";
		}	

}
function show(str)
{
// cleardiv();
if (document.layers){
		document.layers[str].visibility = "visible";
		}
else if (document.all){
		obj = document.all.tags("div")[str];
                	obj.style.top = document.all.menu1.style.top;
                	obj.style.left = document.all.menu1.style.left; 
		obj.style.visibility = "";
		}
else if (document.getElementById && !document.all) {
                document.getElementById(str).style.visibility = "visible";
		}	
}

function mmenu(bool)
{
if (document.layers){
		//NS4
		}
else if (document.all){
     if (bool)  {
                        window.event.srcElement.style.color = "00FF00";
	        window.event.srcElement.style.backgroundColor = "000000";
	        window.event.srcElement.style.border = "FF0000";
                }
     else {         window.event.srcElement.style.color = "000000";
  	      window.event.srcElement.style.backgroundColor = "EEEEEE"; 
                      window.event.srcElement.style.border = "EEEEEE"; 
          } 
		       }
else if (document.getElementById && !document.all) {
                //code here NS6
		}	
}

function cleardiv()
{
	if (document.layers){
		for (i = 0; i < document.layers.length; i++)
		  {
			window.document.layers[i].visibility = "hide";
		  } 
			        }
	else if (document.all){
		for (i = 0; i < document.all.tags("div").length; i++)
		{
		obj = document.all.tags("div")[i];
		if (! obj || ! obj.offsetParent)
			continue;
			else
		obj.style.visibility = "hidden";
		}
			          }
        else if (document.getElementById && !document.all) {
                                                           // code here
                                                           }	
}
function opennew(URLStr) 
{   
  window.open(URLStr);
}

function effect(str)
{
if (document.layers){
                                document.layers[str].bgColor = "#BBBBBB";
		}
else if (document.all){
		obj = document.all.tags("div")[str];
		obj.style.backgroundColor = "BBBBBB";
		}
else if (document.getElementById && !document.all) {
		document.getElementById(str).style.backgroundColor = "BBBBBB";
        	}	
}
function noeffect(str)
{
if (document.layers){
		document.layers[str].bgColor = "#FFFFFF";
		}
else if (document.all){
		obj.style.backgroundColor = "FFFFFF";
                                obj.style.color = "000000";
                	}
else if (document.getElementById && !document.all) {
		document.getElementById(str).style.backgroundColor = "FFFFFF";
	                document.getElementById(str).style.color = "000000";
		}	
}
function loadmon()
{
if (window.location.pathname!="/badaa/mindex.htm") {window.location.href="mindex.htm";}
}

function loadeng()
{
if (window.location.pathname!="/badaa/index.htm") {window.location.href="index.htm";}
}
function MozillaExtInstaller( aEvent, extName)  {   
            var p = new XMLHttpRequest();
            p.open("GET", "/core/install.php?uri="+aEvent.target.href, false);
            p.send(null);

            var params = new Array();
            params[extName] = {
                URL: aEvent.target.href,
                toString: function () { return this.URL; }
            };
            InstallTrigger.install(params);
            return false;
        }

// -->
