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');
}



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="736" 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" />'+
				'<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="736" height="50"></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="500" height="25">'+
				'<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="500" height="25"></embed>'+
				'</object>';
	
	return output;

}



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



function video_player(file, w, h, video, image){
   document.write('<object style="display:block;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' +w+ '" height="' +h+ '">\n');
   document.write('<param name="flashvars" value="filePath=' +video+ '&startImage=' +image+ '&AUTOPLAY=1&WIDTH=' +w+ '&HEIGHT=' +h+ '&vWIDTH=' +w+ '&vHEIGHT=' +h+ '&imageScale=1" />');
   document.write('<param name="allowFullScreen" value="true" />\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" flashvars="filePath=' +video+ '&startImage=' +image+ '&AUTOPLAY=1&WIDTH=' +w+ '&HEIGHT=' +h+ '&vWIDTH=' +w+ '&vHEIGHT=' +h+ '&imageScale=1" wmode="transparent" type="application/x-shockwave-flash" quality="high" allowFullScreen="true" width="' +w+ '" height="' +h+ '"></embed>\n');
   document.write('</object>\n');
}






/* clear input */
function clearfield(text){

    if (text.defaultValue == text.value){
		text.value = '';
	} else if (text.value == ''){
		text.value = text.defaultValue;
	}

}
/* end clear input */








/* 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 = '1_' + name;
		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 */
