// JavaScript Document

// accessible popup window

// popup windows 
var newWin = null; 
function popUp(strURL, strType, strHeight, strWidth) { 
 if (newWin != null && !newWin.closed) 
   newWin.close(); 
 var strOptions=""; 
 if (strType=="console") 
   strOptions="resizable,height="+ 
     strHeight+",width="+strWidth; 
 if (strType=="fixed") 
   strOptions="status,height="+ 
     strHeight+",width="+strWidth; 
 if (strType=="fixedscroll") 
   strOptions="status,scrollbars,height="+ 
     strHeight+",width="+strWidth; 
 if (strType=="elastic") 
   strOptions="toolbar,menubar,scrollbars,"+ 
     "resizable,location,height="+ 
     strHeight+",width="+strWidth;
 if (strType=="elasticmenu") 
   strOptions="menubar,scrollbars,"+ 
     "resizable,height="+ 
     strHeight+",width="+strWidth; 
 newWin = window.open(strURL, 'newWin', strOptions); 
 newWin.focus(); 
}


// email page
function EmailLink(){
window.location = "mailto:"+"?subject=Katanga Mining Limited" + "&body=" + "I thought this link might interest you:  " + document.title + "  " + location.href;
}





// random image

// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = '/kat/images/rotate1.jpg'
theImages[1] = '/kat/images/rotate2.jpg'
theImages[2] = '/kat/images/rotate9.jpg'
theImages[3] = '/kat/images/rotate5.jpg'
theImages[4] = '/kat/images/rotate6.jpg'
theImages[5] = '/kat/images/rotate7.jpg'
theImages[6] = '/kat/images/rotate8.jpg'

// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}

function toggleDiv(_id){
_oDivStyle=document.getElementById(_id).style;
_oDivParent=document.getElementById(_id).parentNode;
//(_oDivStyle.display=='block')?_oDivStyle.display='none':_oDivStyle.display='block';
//if statement replacing conditional operator to allow multiple lines of code for each condition.
if (_oDivStyle.display=='block') {
_oDivStyle.display='none';
_oDivParent.firstChild.style.backgroundColor="#FFFFFF";
}
else { 
_oDivStyle.display='block';
_oDivParent.firstChild.style.backgroundColor="#ECF3FB";
}
}


function jumpMenu(url){
 if(url==''){
 return false;
 }
 else{
 window.open(url,'_parent','menubar=1,toolbar=1,scrollbars=1,resizable=1,status=1,toolbar=1,location=1');
 }
}

function WindowPrint(){
	window.print();
}

function quote()
{

var xmlDoc=null;
if (window.ActiveXObject)
{// code for IE
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
}
else if (document.implementation.createDocument)
{// code for Mozilla, Firefox, Opera, etc.
xmlDoc=document.implementation.createDocument("","",null);
}
else
{
alert('Your browser cannot handle this script');
}
if (xmlDoc!=null)
{
xmlDoc.async=false;
xmlDoc.load("http://ir1.euroinvestor.com/asp/ir/KatangaMining/xmlirmultiiso2.aspx?companyid=280984");

var x=xmlDoc.getElementsByTagName("data");
i=0;

Quote=(x[i].getElementsByTagName("Quote")[0].childNodes[0].nodeValue);

txt="" + Quote;

//document.getElementById("show").innerHTML=txt;
document.write(txt);
}
}