// the following 3 functions are used to change images on hover
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		arabic_over = newImage("/en/images/arabic_over.gif");
		preloadFlag = true;
	}
}


// this funtion is for displaying submenus
function showSubMenu(IDno ) // 1 visible, 0 hidden
{
    if(document.layers)	   //NN4+
    {
       document.layers["mnuWsub" + IDno].display = "none";
       document.layers["mnuSqr" + IDno].display = "none";
       document.layers["mnuWsubCell" + IDno].borderBottom = "border-bottom:1px solid #FFFFFF";       
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {    
        document.getElementById("mnuWsub" + IDno).style.display = "block";
        document.getElementById("mnuSqr" + IDno).style.display = "none";
        document.getElementById("mnuWsubCell" + IDno).style.borderBottom = "1px solid #FFFFFF"; 
    }
    else if(document.all)	// IE 4
    {
       document.all[mnuWsub + IDno].display = "inline";
       document.all[mnuSqr + IDno].display = "none";
       document.all[mnuWsubCell + IDno].borderBottom = "border-bottom:1px solid #FFFFFF"; 
    }
}

// for the gallery to load the images...
function showImg(eventNo, photoNo) {
	mainPhoto.src = '/images/gallery/event' + eventNo +  '/' + photoNo+ '.jpg';
}
