// JavaScript Document
/*

	GRAPHIC ALLIANCE
	
	AUTHOR: Graphic Alliance
	www.graphicalliance.co.uk


*/
var flash_title_ids = Array(); // PC USES TO PASS ON LOAD VARS
var flash_id = 0;

/*
	primary function:
	Resizes divs around flash titles allowing them 
	to expand as required by their own text box
	
	further function: if var pc_IE 
	tells flash that it has already been resized so don't call this function again
	
	reason: pc ie suffers when many js functions called at once, calls dropped rather than queued!

*/
function fn_resize_flash_title(h, id)
{
	//alert(h);//
	th = document.getElementById("flash_title_"+id).style.height;
	if(th != h+'px')
	{
		document.getElementById("flash_title_"+id).style.height = h+'px';
		/*
		*/
		// pc pass var to stop recall
		if(pc_IE == true)
		{
			document.getElementById("f_title_"+id).style.height = h+'px';
			eval("window.document.f_title_"+id).SetVariable("_root.pc_resize","1");			
		}
	}
}
	
/*
	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
	

*/

function firevar(f){

	f.SetVariable("_root.pc_load","1");
	//$(f).outerHTML = $(f).outerHTML;
}

function fn_PassFlash_vars()
{
	ttot = flash_title_ids.length;
	 for(f=0;f<ttot;f++)
	 {	 	
		 if(pc_IE == true)
		 {
		 	if($('f_title_'+f)){
		 	eval("window.document.f_title_"+f).SetVariable("_root.pc_load","1");		 	
		 	}
		 }
	 }
	 
}

function fn_UnPassFlash_vars()
{

	ttot = flash_title_ids.length;
	 for(f=0;f<ttot;f++)
	 {	 	
		 if(pc_IE == true)
		 {
		 	flash_title_ids[f] = '';
		 	//eval("window.document.f_title_"+f).SetVariable("_root.pc_load","0");		 	
		 	$('f_title_'+f).innerHTML = '';		 	
		 }
	 }
 	ttot = 0;
 	flash_title_ids = new Array();

}

//setTimeout("fn_PassFlash_vars();", 5000);
window.onload = fn_PassFlash_vars;


