/**
 * FlashTitle v1.3: Dynamic resizing of on-page display based on content volume
 *
 * FlashTitle is (c) 2007 Graphic Alliance
 *
 */
var flash_title_ids = Array(); // PC USES TO PASS ON LOAD VARS
var flash_id = 0;

/**
* fn_resize_flash_title
*
* primary function:
* Resizes divs around flash titles allowing them 
* to expand as required by their own text box
*	
* further function: if var pc_IE 
* directly resizes flash object as this does not respond to its parent div size correctly
*
*/
function fn_resize_flash_title(h, id)
{
	var th = $("flash_title_"+id).style.height;
	if(th != h+'px')
	{
		$("flash_title_"+id).style.height = h+'px';
	
		if(pc_IE == true)
		{
			$("f_title_"+id).SetVariable("_root.pc_resize","1");
			$("f_title_"+id).style.height = h+'px';
			$("f_title_"+id).style.width = '100%';
		}
		/*
		*/
	}
}

function debug(msg)
{
	var err = $('module_dynamic_title4').innerHTML+"<p>" + msg + "</p>";
	$('module_dynamic_title4').innerHTML = err;
}

/**
* window.onload
*
* primary function:
* Called on page load to tell flash titles that they can call the js functions 
* 	
* reason: pc ie cannot deal with css backgrounds and js calls before the page has loaded
* 	
*/
window.onload = function(){
	var ttot = flash_title_ids.length;
	 for(f=0;f<ttot;f++)
	 {
		 if(pc_IE == true)
		 {
			 $("f_title_"+flash_title_ids[f]).SetVariable("_root.pc_load","1");
		 }
	}
} 



