// JavaScript Document
function set_background(id,image){
	document.getElementById(id).style.background = 'url('+image+') top right no-repeat #fff'
}

function input_highlight(obj){
	obj.style.backgroundColor = "#FFFF00";
}

function input_unhighlight(obj){
	obj.style.backgroundColor = "#FFFFFF";
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function set_splash_image(id,image,gallery_link,image_text){
	gallery_link_thumb = gallery_link.replace(".jpg","-thumb.jpg")
	document.getElementById(id).innerHTML = '<img style="cursor:pointer;" src="'+image+'" onclick="window.location=\''+gallery_link_thumb+'\'" >'+'<div id="'+id+'Caption"  onclick="window.location=\''+gallery_link_thumb+'\'">'+image_text+'</div>'
}
var boxes = new Array()
var max_box_height = 0
function init_box_heigh_update(){
	get_boxes();
	set_box_height()
	//update_box_heights()
}
function get_boxes(){
	var parent1 = document.getElementById("contentCol");
	
	try{
		var thisChild = parent1.firstChild;
		box_inc = 0
		while ( thisChild != parent1.lastChild ){
			if ( thisChild.nodeType == 1 )		{
				if(thisChild.id.indexOf('Lbox') != -1){
					boxes[box_inc] = thisChild.id
					box_inc++;
				}
			}
			thisChild = thisChild.nextSibling;
		}
	}catch(e){
		e = null;
	}
}
function set_box_height(){
	for(var i = 0; i< boxes.length; i++){
		box_height = document.getElementById(boxes[i]).offsetHeight
		if(box_height > max_box_height){
			max_box_height = box_height
		}
	}
}

function update_box_heights(){
	for(var i = 0; i< boxes.length; i++){
		if(navigator.appVersion.indexOf('MSIE 6') != -1){
			adjust = 110;
		}else{
			adjust = 10;
		}
		document.getElementById(boxes[i]).style.height = (parseInt(max_box_height) - adjust)+"px"
	}
}
init_box_heigh_update()

function faq_over(obj){
	cur_class = obj.className
	if(cur_class.indexOf('Over') != -1){
		obj.className = cur_class.replace("Over","")
	}else{
		obj.className = cur_class+"Over"
	}
}
