// 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)
		{
			//alert("flash title");
			eval("window.document.f_title_"+id).SetVariable("_root.pc_resize","1");		
			eval("window.document.f_title_"+flash_title_ids[id]).style.height = h+'px';
			eval("window.document.f_title_"+flash_title_ids[id]).style.width = '100%';
		}
	}/**/
}
	
/*
	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()
{
	if(pc_IE == true)
	{
		window.setTimeout("fn_PassFlash_vars()", 20);
	}
}
window.onload = fn_PassFlash_vars();

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



