	var formopen = 0;
	var currentopenobj =  null;
	function dispHandle(obj) 
	{
		currentopenobj=obj;
		if (!formopen)
		{
			var sect = obj.parentNode;
			for (var c=0; c < sect.childNodes.length; c++) //(x in sect.childNodes)
			{
				if (sect.childNodes[c].nodeName=='DIV')
				{
					if (typeof subsect1 == 'undefined')
					{
						var subsect1 = sect.childNodes[c];
					}
					else
					{
						if (typeof subsect2 == 'undefined')
						{
							var subsect2 = sect.childNodes[c];
						}
					}
				}
			}
			if (trim(subsect1.innerHTML)!='')
			{
				if (subsect1.style.display == "none")
					subsect1.style.display = "";
				else
					subsect1.style.display = "none";
				if (subsect2.style.display == "none")
					subsect2.style.display = "";
				else
					subsect2.style.display = "none";
			}
		}
	}

	function trim(str) 
	{
		var newstr;
		newstr = str.replace(/^\s*/, "").replace(/\s*$/, ""); 
		newstr = newstr.replace(/\s{2,}/, " "); 
		return newstr;
	} 
	
	function openform() 
	{
		formopen = 1;
	}
	function closeform() 
	{
		formopen = 0;
		dispHandle(currentopenobj);
	}

	function goLite(BTN)
	{
	   BTN.style.backgroundColor = "#3388FF";
	   BTN.style.filter = "progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff33BBFF',EndColorStr='#ff3366BB')";
	}
	
	function goDim(BTN)
	{
	   BTN.style.backgroundColor = "#3366FF";
	   BTN.style.filter = "progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff3366FF',EndColorStr='#ff335555')";
	}

	function openshadowbox(url, t, w, h)
	{
		if (typeof w == 'undefined')
		{
			w=450;
		}
		if (typeof h == 'undefined')
		{
			h=500;
		}

		if (typeof t == 'undefined')
		{
			t='';
		}

		Shadowbox.open({
			player:'iframe', 
			title:t, 
			content:url, 
			height:h,
			width:w
		});
	}

	Shadowbox.init({
		onOpen:openform ,
		onClose:closeform
	});


