<!--
function loadXMLDoc(fname)  
{  
    var xmlDoc;  
  
    // code for IE  
    if (window.ActiveXObject) {  
        xmlDoc=new ActiveXObject("Microsoft.XMLDOM");  
    }  
  
    // code for Mozilla, Firefox, Opera, etc.  
    else if (document.implementation && document.implementation.createDocument) {          
        xmlDoc=document.implementation.createDocument("","",null);                  
    }  
    else {  
        alert('Your browser cannot handle this script');  
    }  
    
    try
    {

       var ua = navigator.userAgent.toLowerCase();
       if (ua.indexOf('safari/') != -1){ //user is reporting as Safari, use XMLHttpRequest instead.
          XmlHTTP = new XMLHttpRequest();
          XmlHTTP.open("get", fname, false);
          XmlHTTP.send("");
          var xDoc = XmlHTTP.responseXML;          
          return xDoc;
       } else {
         xmlDoc.async=false;
         xmlDoc.load(fname);
         return(xmlDoc); 

       }
    }
    catch (e) { alert(e.message); }      
    
    return (null);  
}  

function displayResult(bodyid, xmlname, xslname)  
{  
    xml=loadXMLDoc(xmlname);      
    xsl=loadXMLDoc(xslname);      
    // code for IE  
    if (window.ActiveXObject) {  
	    
        ex=xml.transformNode(xsl);  
        var doc = document.getElementById(bodyid);
        if (doc == null) alert('doc not found' + bodyid);
        doc.innerHTML=ex;  
    }  
  
    // code for Mozilla, Firefox, Opera, etc.  
    else if (document.implementation && document.implementation.createDocument) {  	        
        xsltProcessor=new XSLTProcessor();  
        xsltProcessor.importStylesheet(xsl);  
        resultDocument = xsltProcessor.transformToFragment(xml,document);          
        document.getElementById(bodyid).appendChild(resultDocument);                                 
    }  
}  

function SetWidth(image, w, h)
{   
    var ratio = image.width / image.height;
    if (image.width >= image.height)
    {
        image.width = w;
        image.height = w / ratio
    }
    else
    {
        image.height= h;
        image.width = h * ratio       
                
    }
}

function ChangeBGColor(sColor)
{
    document.bgcolor=sColor;
}

function showmenu(count, menuid, prefix)
{    
    for (var i = 1; i <= count; ++i)
    {
        var menu = document.getElementById(prefix + i);
        if (i == menuid)
        {
            menu.style.visibility = "visible";
        }
        else
        {
            menu.style.visibility = "hidden";
        }
    }
}

function showmenu2(count, menuid, prefix)
{    
    for (var i = 1; i <= count; ++i)
    {
        var menu = document.getElementById(prefix + i);
        if (i == menuid)
        {
            menu.style.visibility = "hidden";
        }
        else
        {
            menu.style.visibility = "visible";
        }
    }
}

var img_array = new Array();

img_array[0] = "photos/img_00.jpg"
img_array[1] = "photos/img_01.jpg"
img_array[2] = "photos/img_02.jpg"
img_array[3] = "photos/img_03.jpg"
img_array[4] = "photos/img_04.jpg"
img_array[5] = "photos/img_05.jpg"
img_array[6] = "photos/img_06.jpg"
img_array[7] = "photos/img_07.jpg"
img_array[8] = "photos/img_08.jpg"
img_array[9] = "photos/img_09.jpg"

    
function show_image(fname) {
    var image = document.getElementById(fname);
    if (image != null)
    {
        var ran_number=Math.floor(Math.random() * img_array.length);
        //image.src = img_array[ran_number];    
		image.src = "images/blank.jpg";
    }
}
 //-->
