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('<embed src="flash/' +file+ '.swf" wmode="transparent" quality="high" width="' +w+ '" height="' +h+ '"></embed>\n');
   document.write('</object>\n');
}



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="690" height="50">'+
				'<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" />'+
				'<embed flashvars="h1text=' + text + '" src="flash/h1_text.swf" wmode="transparent" quality="high" width="690" height="50"></embed>'+
				'</object>';
	
	return output;

}




/* a href submit form */
function hrefsubmit(formname){

	// standard form submit //
	if(formname == 'product_add'){
	
		document.forms[formname].submit();
		
		/*	
		var attributes_1	= document.getElementById('attributes_1').value;
		var attributes_2 	= document.getElementById('attributes_2').value;
		var stamp			= document.getElementById('stamp').value;
		
		if(s_size == "" || s_colour == "" || s_with == "" || s_without == ""){
			alert("Please ensure all fields are filled in.");
		} else {
			document.forms[formname].submit();
		}*/
	
	}

}
/* end submit form */



/* hide/show divs */
var div = ''; // must be set outside the function so it is global //
function showdiv(id, name){

	id = id + '_' + name;
	
	if(div == ''){
		div = id;		
		document.getElementById(div).style.display = "none";		
	}
	
	if(div.indexOf(name) != -1){
		document.getElementById(div).style.display = "none";
	}

	if(id && document.getElementById(id)){
		document.getElementById(id).style.display = "block";
		div = id;
	}

}
/* end hide/show divs */
