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 PNGSwap(myID, strSrc){
  //   ONLY FOR IE > 5.5
   var oSpan = document.getElementById(myID);
   oSpan.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+strSrc+"', sizingMethod='scale');";
}
function setFieldValue(obj,defValue){
// clears the field if it holds the default value
	if(obj.value == defValue){
		obj.value = '';
	}else if(obj.value == ''){
		obj.value = defValue;
	}
	return true;
}
function printFlash(filename,bgcolor, transparent, width, height, objectid,quality, html){
  var bgcolor = (bgcolor == null) ? "#000000" : bgcolor;
  var transparent = (transparent == false) ? false : true;
  var width=(width==null?200:width);
  var height=(height==null?200:width);
  var objectid=(objectid==null?'flash_object':objectid);
  var quality=(quality==null?'high':quality);
  if(filename){
    var flash_string = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + width +'" height="' + height + '" id="' + objectid +'" align="middle">\n'
              +'<param name="allowScriptAccess" value="sameDomain" />\n'
              +'<param name="movie" value="' + filename + '" />\n'
              +'<param name="quality" value="' + quality + '" />\n'
              +'<param name="bgcolor" value="' + bgcolor + '" />\n'
              +(transparent==true?'<param name="wmode" value="transparent" />\n':'')
              +'<embed src="' + filename + '" quality="' + quality +'" bgcolor="' + bgcolor + '" '+(transparent?' wmode="transparent"':'')+' width="' + width + '" height="' + height + '" name="' + objectid + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n'
              +(html?decodeURI(html)+'\n':'')
              +'</object>\n';
    document.write(flash_string);
  }else{
    return false;
  }
}
