window.onload = init;
function init(){
	submenu_links('fl');
}


function flash(file, w, h){
   document.write('<object style="display:block;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' +w+ '" height="' +h+ '">\n');
   document.write('<param name="movie" value="flash/' +file+ '.swf" />\n');
   document.write('<param name="quality" value="high" />\n');
   document.write('<param name="scale" value="noborder" />\n');
   document.write('<param name="wmode" value="transparent" />\n');
   document.write('<param name="type" value="application/x-shockwave-flash" />\n');
   document.write('<embed src="flash/' +file+ '.swf" wmode="transparent" type="application/x-shockwave-flash" quality="high" width="' +w+ '" height="' +h+ '"></embed>\n');
   document.write('</object>\n');
}


if (document.images) {
    imgPreload = new Image();
    imgPreload.src = "background_images/btn_main_o.gif";
	imgPreload1 = new Image();
    imgPreload1.src = "background_images/btn_small_o.gif";
}


function ep_popup(url){
	newwindow=window.open(url,'enquirepackage','height=390,width=520');
	if (window.focus) {newwindow.focus()}
	return false;
}


function submenu_links(id){
	
	var submenu_list = new Array("sm1", "sm3", "sm6");
	var ta = submenu_list.length-1;
	
	if(id == "-" || id == 'fl'){
	
		for(x=0; x<=ta; x++){
			document.getElementById(submenu_list[x]).style.display = "none";
		}
		
		if(id == 'fl'){ document.getElementById(submenu_list[0]).style.display = "block"; }
	
	} else {
	
		for(x=0; x<=ta; x++){
			document.getElementById(submenu_list[x]).style.display = "none";
		}
	
		var toggle = document.getElementById(id);
		
		if(toggle.style.display == "block"){
			toggle.style.display = "none";
		} else {	
			toggle.style.display = "block";
		}
	
	}

}





function h1_flash(id) {
	var text = document.getElementById(id).innerHTML;
	document.getElementById(id).innerHTML = h1_output(text);
}

function h1_output(text){

	var output ='<object style="display: block;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="670" height="101">'+
				'<param name="flashvars" value="h1text=' + text + '" />'+
				'<param name="movie" value="flash/h1_text.swf" />'+
				'<param name="quality" value="high" />'+
				'<param name="scale" value="noborder" />'+
				'<param name="wmode" value="transparent" />'+
				'<param name="type" value="application/x-shockwave-flash" />'+
				'<embed flashvars="h1text=' + text + '" src="flash/h1_text.swf" wmode="transparent" type="application/x-shockwave-flash" quality="high" width="670" height="101"></embed>'+
				'</object>';
	
	return output;

}




function h2_flash(id) {
	var text = document.getElementById(id).innerHTML;
	document.getElementById(id).innerHTML = h2_output(text);
}

function h2_output(text){

	var output ='<object style="display: block;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="250" height="20">'+
				'<param name="flashvars" value="h2text=' + text + '" />'+
				'<param name="movie" value="flash/h2_text.swf" />'+
				'<param name="quality" value="high" />'+
				'<param name="scale" value="noborder" />'+
				'<param name="wmode" value="transparent" />'+
				'<param name="type" value="application/x-shockwave-flash" />'+
				'<embed flashvars="h2text=' + text + '" src="flash/h2_text.swf" wmode="transparent" type="application/x-shockwave-flash" quality="high" width="250" height="20"></embed>'+
				'</object>';
	
	return output;

}
