// Check if browser is DOM complainant
if (document.getElementById){
		// toggle div visibility 
		function toggle( targetId ){
				target = document.getElementById( targetId );
					if (target.style.display == "none"){
						target.style.display = "";
					} else {
						target.style.display = "none";
					}
		}

		// Fix Cleardiv for Mac
		function fixmacie(classname){        
		var divs=document.getElementsByTagName("DIV");   
		  for(var d=0; d < divs.length;d++){     
		 if(divs[d].className.indexOf(classname)==0){    
		 divs[d].innerHTML+= "<div class='mac-clearfix'> </div>"; 
		 } } }
		 
		if( navigator.appVersion.indexOf('Mac')!=-1 && document.all){     
			fixmacie("clearfix");  
		}


	// Replace image - Jacobus van Niekerk Feb 2004
	function replaceimg (id,attribute,value,title) {
			document.getElementById(id).setAttribute(attribute,value)
			document.getElementById(id).setAttribute('title',title)
			document.getElementById(id).setAttribute('alt',title)
		}


	//Reads CSS values
	function getElementStyle(elemID, IEStyleProp, CSSStyleProp) {
		var elem = document.getElementById(elemID);
		if (elem.currentStyle) {
			//return elem.currentStyle[IEStyleProp];
			return elem.offsetHeight;
		} else if (window.getComputedStyle) {
			var compStyle = window.getComputedStyle(elem, "");
			return compStyle.getPropertyValue(CSSStyleProp);
		}
		return "";
	}	



/*
Disable right click script II (on images)- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
Modified here to disable IE image hover menu and
truly disable right click in FF by jscheuer1 in
http://www.dynamicdrive.com/forums
*/

var clickmessage="Right click disabled on images!"

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById)
if (e.which==3&&e.target.tagName=="IMG")
setTimeout("alert(clickmessage)",0)
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

if (document.all){
document.onmousedown=disableclick
for (var i_tem = 0; i_tem < document.images.length; i_tem++)
document.images[i_tem].galleryimg='no'
}
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()
}

