// JavaScript Document
/*

	QUANTUM RETAIL
	
	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 = $("flash_title_"+id).style.height;
	if(th != h+'px')
	{
		$("flash_title_"+id).style.height = h+'px';
		
		// pc pass var to stop recall
		if(pc_IE == true)
		{
			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
	

*/
window.onload = function()
{
	//alert('load');
	ttot = flash_title_ids.length;
	 for(f=0;f<ttot;f++)
	 {
		//alert(flash_title_ids[f]);//
		 if(pc_IE == true)
		 {
			 eval("window.document.f_title_"+flash_title_ids[f]).SetVariable("_root.pc_load","1");
		 }
	 }
} 

/*
	primary function:
	Called on title load (html) to add title to title array 
	
	reason: pc ie cannot deal with css backgrounds and js calls before the page has loaded
	

*/
function fn_add_title(div_id)
{
	//alert('fn_add_title');
	var p = flash_title_ids.push(div_id);
} 
