

//function selectLaunch(url){

// JavaScript Document

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function Open_Win(str_url, str_name, int_width, int_height) 
{
	var winX = (screen.width - int_width) / 2;
	var winY = (screen.height - int_height) / 2;
	str_WinParams = 'height=' + int_height +',width=' + int_width + ',top=' + winY+',left=' + winX + ',menubar=0,toolbar=0,scrollbars=1,resizable=0,status,toolbar=0';
	win = window.open(str_url, str_name, str_WinParams);
}


function Show(part_id)
{
	for(loopcounter=1;loopcounter<=9;loopcounter++)
	{
		if(loopcounter == part_id)
			{ 
				document.getElementById('part'+loopcounter).style.display='block'; 
				document.getElementById('select'+loopcounter).className="on";
				document.getElementById('HideAll').className="off";
			} 
		else
			{ 
				document.getElementById('part'+loopcounter).style.display='none'; 
				document.getElementById('select'+loopcounter).className="off";
				document.getElementById('HideAll').className="off";
			}
	}
} 

function Show_min(part_id)
{
	for(loopcounter=1;loopcounter<=4;loopcounter++)
	{
		if(loopcounter == part_id)
			{ 
				document.getElementById('part'+loopcounter).style.display='block'; 
				document.getElementById('select'+loopcounter).className="on";
				document.getElementById('HideAll').className="off";
			} 
		else
			{ 
				document.getElementById('part'+loopcounter).style.display='none'; 
				document.getElementById('select'+loopcounter).className="off";
				document.getElementById('HideAll').className="off";
			}
	}
} 

function Show_5(part_id)
{
	for(loopcounter=1;loopcounter<=5;loopcounter++)
	{
		if(loopcounter == part_id)
			{ 
				document.getElementById('part'+loopcounter).style.display='block'; 
				document.getElementById('select'+loopcounter).className="on";
				document.getElementById('HideAll').className="off";
			} 
		else
			{ 
				document.getElementById('part'+loopcounter).style.display='none'; 
				document.getElementById('select'+loopcounter).className="off";
				document.getElementById('HideAll').className="off";
			}
	}
} 

function Show_2(part_id)
{
	for(loopcounter=1;loopcounter<=2;loopcounter++)
	{
		if(loopcounter == part_id)
			{ 
				document.getElementById('part'+loopcounter).style.display='block'; 
				document.getElementById('select'+loopcounter).className="on";
			} 
		else
			{ 
				document.getElementById('part'+loopcounter).style.display='none'; 
				document.getElementById('select'+loopcounter).className="off";
			}
	}
} 



function Show_4(part_id)
{
	for(loopcounter=1;loopcounter<=4;loopcounter++)
	{
		if(loopcounter == part_id)
			{ 
				document.getElementById('part'+loopcounter).style.display='block'; 
				document.getElementById('select'+loopcounter).className="on";
			} 
		else
			{ 
				document.getElementById('part'+loopcounter).style.display='none'; 
				document.getElementById('select'+loopcounter).className="off";
			}
	}
} 



function Show_All(part_id)
{
	for(loopcounter=1;loopcounter<=9;loopcounter++)
	{
		document.getElementById('part'+loopcounter).style.display='block'; 
		document.getElementById('HideAll').className="on";
		document.getElementById('select'+loopcounter).className="off";
	}
} 


function Show_All6(part_id)
{
	for(loopcounter=1;loopcounter<=6;loopcounter++)
	{
		document.getElementById('part'+loopcounter).style.display='block'; 
		document.getElementById('HideAll').className="on";
		document.getElementById('select'+loopcounter).className="off";
	}
} 


function Show_All3(part_id)
{
	for(loopcounter=1;loopcounter<=3;loopcounter++)
	{
		document.getElementById('part'+loopcounter).style.display='block'; 
		document.getElementById('HideAll').className="on";
		document.getElementById('select'+loopcounter).className="off";
	}
} 



function Show_All4(part_id)
{
	for(loopcounter=1;loopcounter<=4;loopcounter++)
	{
		document.getElementById('part'+loopcounter).style.display='block'; 
		document.getElementById('HideAll').className="on";
		document.getElementById('select'+loopcounter).className="off";
	}
} 


 function openPop(form) {
     var url=(form.dir.options[form.dir.selectedIndex].value);
     myWindow = window.open(url);
}




// Used for pages with strict doctypes (i.e. no target="_blank")
// Automagically adds them back in to links with rel="external"

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") {
     anchor.target = "_blank";
    }

   if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "shareholdershelppopup") {
     anchor.onkeypress = function(){ window.open('http://miranda.hemscott.com/helppages/majorshareholders.htm', 'CtrlWindow', 'toolbar=no,menubar=no,height=420,width=580,location=no,scrollbars=yes,resizable=no,status=no,left=100,top=100');return false;}
     anchor.onclick = function(){window.open('http://miranda.hemscott.com/helppages/majorshareholders.htm', 'CtrlWindow', 'toolbar=no,menubar=no,height=420,width=580,location=no,scrollbars=yes,resizable=no,status=no,left=100,top=100');return false;}
     anchor.setAttribute("href","#");
     }

    if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "news-item") {
         anchors[i].onkeypress = function(){ window.open(this.href, 'NewsItem', 'toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,status=no,height=580,width=600');return false;}
         anchors[i].onclick = function(){window.open(this.href , 'NewsItem', 'toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,status=no,height=580,width=600');return false;}
    }
    
    
      if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "auditor") {
                  anchors[i].onkeypress = function(){ window.open(this.href, 'AuditorDisclaimer', 'toolbar=no, menubar=no,location=no,scrollbars=yes,resizable=yes,status=no,height=430,width=500');return false;}
                  anchors[i].onclick = function(){window.open(this.href , 'AuditorDisclaimer', 'toolbar=no, menubar=no,location=no,scrollbars=yes,resizable=yes,status=no,height=430,width=500');return false;}
     }
    

    if (anchor.getAttribute("href") && anchor.getAttribute ("rel") == "charthelp") {
         anchor.onkeypress = function(){window.open('http://miranda.hemscott.com/helppages/gifgraphs.htm ', 'ChartHelp', 'toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,status=no,height=580,width=600');return false;}
         anchor.onclick = function(){window.open(' http://miranda.hemscott.com/helppages/gifgraphs.htm', 'ChartHelp', 'toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,status=no,height=580,width=600');return false;}
         anchor.setAttribute ("href","#");
    }


 if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "termofuse") {
         anchors[i].onkeypress = function(){ window.open(this.href, 'Terms Of use', 'toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,status=no,height=505,width=638,left=100,top=100');return false;}
         anchors[i].onclick = function(){window.open(this.href , 'Term Of use', 'toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,status=no,height=505,width=638,left=100,top=100');return false;}
    }

   if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "disclaimer") {
      var disclaimerURL = anchor.getAttribute('href');
      anchor.onkeypress = function(){window.open('http://miranda.hemscott.com/legal/cust_disclaim.htm', 'CtrlWindow', 'toolbar=no,menubar=no,height=505px,width=638px,location=no,scrollbars=yes,resizable=no,status=no,left=100,top=100');return false;}
      anchor.setAttribute("href","#");
      anchor.onclick = function(){window.open('http://miranda.hemscott.com/legal/cust_disclaim.htm', 'CtrlWindow', 'toolbar=no,menubar=no,height=505px,width=638px,location=no,scrollbars=yes,resizable=no,status=no,left=100,top=100');return false;}
      anchor.setAttribute("href","#");
      }


}

}

window.onload = externalLinks;
