function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}

function handleEnter (field, event) {
		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		if (keyCode == 13) {
			var i;
			for (i = 0; i < field.form.elements.length; i++)
				if (field == field.form.elements[i])
					break;
			i = (i + 1) % field.form.elements.length;
			field.form.elements[i].focus();
			return false;
		} 
		else
		return true;
	}
	
function f40_Disable(f40_par,f40_obj,f40_state){
if (f40_par){f40_clds=f40_AllElements(document.getElementById(f40_par)); }
else { f40_clds=f40_AllElements(f40_obj.parentNode); }
if (!f40_obj.ary){
f40_obj.ary=new Array();
for (f40_0=0;f40_0<f40_clds.length;f40_0++){
if (f40_clds[f40_0].tagName=='INPUT'||f40_clds[f40_0].tagName=='SELECT'||f40_clds[f40_0].tagName=='TEXTAREA'){
f40_obj.ary[f40_obj.ary.length]=f40_clds[f40_0];
}
}
}
for (f40_1=0;f40_1<f40_obj.ary.length;f40_1++){
f40_obj.ary[f40_1].removeAttribute('disabled');
}
if (f40_obj.checked==f40_state){
for (f40_2=0;f40_2<f40_obj.ary.length;f40_2++){
f40_obj.ary[f40_2].setAttribute('disabled','disabled');
}
}
f40_obj.removeAttribute('disabled');
}

function f40_AllElements(f40_){
if (f40_.all){ return f40_.all; }
return f40_.getElementsByTagName('*');
}


function f50_Disable(f50_par,f50_obj,f50_state){
if (f50_par){f50_clds=f50_AllElements(document.getElementById(f50_par)); }
else { f50_clds=f50_AllElements(f50_obj.parentNode); }
if (!f50_obj.ary){
f50_obj.ary=new Array();
for (f50_0=0;f50_0<f50_clds.length;f50_0++){
if (f50_clds[f50_0].tagName=='INPUT'||f50_clds[f50_0].tagName=='SELECT'||f50_clds[f50_0].tagName=='TEXTAREA'){
f50_obj.ary[f50_obj.ary.length]=f50_clds[f50_0];
}
}
}
for (f50_1=0;f50_1<f50_obj.ary.length;f50_1++){
f50_obj.ary[f50_1].removeAttribute('disabled');
}
if (f50_obj.checked==f50_state){
for (f50_2=0;f50_2<f50_obj.ary.length;f50_2++){
f50_obj.ary[f50_2].setAttribute('disabled','disabled');
}
}
f50_obj.removeAttribute('disabled');
}

function f50_AllElements(f50_){
if (f50_.all){ return f50_.all; }
return f50_.getElementsByTagName('*');
}





function InsertSampleMovie()
{
  document.write('<object CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="336" height="158" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">\n');
  document.write('<param name="src" value="media/JibFest.mov" />\n');
  document.write('<param name="autoplay" value="false" />\n');
  document.write('<param name="quality" value="high" />\n');
  document.write('<param name="loop" value="false" />\n');
  document.write('<param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Clear_Skin_1&streamName=coorslight-traumaseries-1&autoPlay=true&autoRewind=false" />\n');
  document.write('<embed src="media/JibFest.mov" width="336" height="158" autoplay="false" loop="false" controller="true" pluginspage="http://www.apple.com/quicktime/">\n');
  document.write('</object>\n');
}

function InsertSampleMovie2()
{
  document.write('<object width="420" height="351">\n');
  document.write('<param name="movie" value="http://www.youtube.com/v/Ziu40slvvM8&rel=1" />\n');
  document.write('<param name="wmode" value="transparent" />\n');
  document.write('<param name="quality" value="high" />\n');
  document.write('<param name="scale" value="noscale" />\n');
  document.write('<embed src="http://www.youtube.com/v/Ziu40slvvM8&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="420" height="351" />\n');
  document.write('</object>\n');
}

function InsertSampleMovie3()
{
  document.write('<object width="420" height="351">\n');
  document.write('<param name="movie" value="http://www.youtube.com/v/41r6q_-C_vo&rel=1" />\n');
  document.write('<param name="wmode" value="transparent" />\n');
  document.write('<param name="quality" value="high" />\n');
  document.write('<param name="scale" value="noscale" />\n');
  document.write('<embed src="http://www.youtube.com/v/41r6q_-C_vo&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="420" height="351" />\n');
  document.write('</object>\n');
}

function InsertSampleMovie4()
{
  document.write('<object width="420" height="351">\n');
  document.write('<param name="movie" value="http://www.youtube.com/v/qtil0Kqf4q0&hl=en" />\n');
  document.write('<param name="wmode" value="transparent" />\n');
  document.write('<param name="quality" value="high" />\n');
  document.write('<param name="scale" value="noscale" />\n');
  document.write('<embed src="http://www.youtube.com/v/qtil0Kqf4q0&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="420" height="351" />\n');
  document.write('</object>\n');
}



