<!--
/* CSS handeling function */
var selected_item;


function set_class(placeholder) {
	navRoot = document.getElementById(placeholder)
	list_items = navRoot.getElementsByTagName("LI");

		for(i=0; i<list_items.length; i++ ){
			node = list_items[i];
			if(node.className == 'selected'){
				
				selected_item = node.getElementsByTagName('ul');
				if(selected_item[0]){
					/*selected_item = selected_item[0];
					selected_item.onmouseover = null;
					selected_item.onmouseout = null;*/
				}else{
					selected_item = false;
				}

				
				selected_node = node;
			}
		}
	
	set_trigger(placeholder);

}


function set_trigger(placeholder){
	navRoot = document.getElementById(placeholder).firstChild;
	
	for(i=0; i<navRoot.childNodes.length; i++){
		node = navRoot.childNodes[i];
		//if(node.className != 'selected'){
			node.onmouseover = function(){
				if(document.all){ this.className+=" over"; }
				if(selected_item){
					selected_item.style.visibility = 'hidden';
				}
			}
			
			node.onmouseout = function(){
				if(document.all){this.className=this.className.replace(" over", "");}
				if(selected_item){
					selected_item.style.visibility = 'visible';
					selected_item.style.width = "740";
				}
			}
			
		//}
	
	}
	
	
	/*	for(i=0; i<items.length; i++ ){
		node = items[i];
		if(node.className != "selected"){
		alert(node.parent.type);
		sub_items = node.getElementsByTagName('UL');
			if(sub_items.length > 0){
				for(i=0; i<sub_items.length; i++ ){
					subnode = sub_items[i];
					subnode.onmouseover = function(){
						selected_item.style.display = "none";
						subnodenode.onmouseover;
					}
				}
			}
		}
	}*/
}

/* open gallery popup window */
function gallery_zoom(url,name,width,height){
  	var l = (screen.width - width) / 2;
  	if(screen.width <= width){
  		width=screen.width;
  	}
  	if(screen.height <= height){
  		height=screen.height;
 	 	var t = 0;
  		var scroll = 1;
  	}else{
  		var t = (screen.height - height) / 2;
  		var scroll = 1;
  	}
	mewin=window.open(url,name,'toolbar=0,location=0,top='+t+',left='+l+',directories=0,status=0,'+'menubar=0,scrollbars='+scroll+',resizable=1,width='+width+',height='+height);
}

/* rezise window to optimal width/height */
function setClientSize(W, H){
    window.resizeTo(W, H);


    var cp = document.createElement("div");
    cp.style.position = "absolute";
    cp.style.width = "0px";
    cp.style.height = "0px";
    cp.style.right = "0px";
    cp.style.bottom = "0px";

    document.body.appendChild(cp);

    var current_width = cp.offsetLeft;
    var current_height = cp.offsetTop;

    var dw = W - current_width;
    var dh = H - current_height;

    window.resizeBy(dw, dh);
	window.moveTo(((screen.width/2)-((W + dw)/2)),(((screen.height/2)-((H+dh)/2)-30)));

    document.body.removeChild(cp);

    return { missed_width: dw, missed_height: dh };
}

-->
