// JavaScript Document

var ext,light,dark,but;

function highlight(obj) {
	dark = obj.src.toString();
	light = dark.substring(0,dark.length-4);
	ext = dark.substring(dark.length-4,dark.length)
	light += "_over" + ext;
	obj.src=light;	}

function dim(obj) {
	light = obj.src.toString();
	dark = light.substring(0,light.length-9);
	ext = light.substring(light.length-4,light.length)
	dark += ext;
	obj.src=dark; }
	
	
function show(what) {
	obj = document.getElementById(what);
	if(obj.style.visibility == "visible") { obj.style.visibility = "hidden"; } 
	else  { obj.style.visibility = "visible"; } }


function openwin(which) { window.open (which, "newwin1", "resizable, width=450, height=630, status, location=no, top=100, left=100"); }

function openwin2(which) { window.open (which, "newwin1", "resizable, width=450, height=880, status=no, location=no, top=50, left=100"); }





function expand(obj) {

	
	
	var flipper =  obj.parentNode.id + "_flipper";	
	if(document.getElementById(flipper)) { 
		document.getElementById(flipper).style.display="block"; 
		var tr_id = obj.parentNode.id + '_tr';
		document.getElementById(tr_id).style.background = "#c5c5c5 url('images/plans_tr_bg.png') repeat-x top";
		obj.parentNode.style.display="none";	
	}
	
	
	else {	
		var div0 = obj.parentNode.parentNode.parentNode.parentNode.parentNode;
		var div = div0.id.substring(0,div0.id.length-8);	
		document.getElementById(div).style.display="block";
		var tr_id = div + '_tr';
		document.getElementById(tr_id).style.background = "none";
		div0.style.display="none";	
		}
		
	
	
}



function expandCase(obj) {
		
	obj0 = obj.nextSibling.nextSibling;
	if(obj0.style.display!="block") obj0.style.display="block";
	else { obj0.style.display="none"; }

if(obj.style.color == "black") { obj.style.color = "#777777";
		obj.parentNode.style.borderLeft = "solid 0px black";
		obj.parentNode.style.paddingLeft = "15px" }

else {  obj.style.color = "black";
		obj.parentNode.style.borderLeft = "solid 5px black";
		obj.parentNode.style.paddingLeft = "25px";
	}

}



function collapse(which) {
	but = which.toString() + "_but";
	document.getElementById(which).style.display="none";
	document.getElementById(but).style.display="inherit";
}



function showLarge(what) {
var LD = document.getElementById('large_img_div');	
	LD.style.visibility = "visible";
	document.getElementById('large_img').src=what;
	
	// ADD HERE A 3rd party script or something to have an image popup in the middle
	
}





	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
