// flash Document
function playswf(sFile,sWidth,sHeight,svar){
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+ sWidth +'" height="'+ sHeight +'"> ');
document.write(' <param name="allowScriptAccess" value="sameDomain" /> ');
document.write(' <param name="movie" value="'+ sFile +'"> ');
document.write(' <param name="quality" value="high"> ');
document.write(' <param name="scale" value="noscale"> ');
document.write(' <param name="wmode" value="transparent"> ');
document.write(' <param name="salign" value="t">');
document.write('<param name="FlashVars" value="'+ svar +'">')
document.write(' <embed src="'+ sFile +'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ sWidth +'" height="'+ sHeight +'"></embed> ');
document.write('</object> ');
}

//open full windows
var imgObj;
function checkImg(theURL,winName){
  if (typeof(imgObj) == "object"){
	if ((imgObj.width != 0) && (imgObj.height != 0))
	  OpenFullSizeWindow(theURL,winName, ",width=" + (imgObj.width+20) + ",height=" + (imgObj.height+30));
	else
	  setTimeout("checkImg('" + theURL + "','" + winName + "')", 100)
  }
}

function OpenFullSizeWindow(theURL,winName,features) {
  var aNewWin, sBaseCmd;
  sBaseCmd = "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,";
  if (features == null || features == ""){
	imgObj = new Image();
	imgObj.src = theURL;
	checkImg(theURL, winName)
  }
  else{
	aNewWin = window.open(theURL,winName, sBaseCmd + features);
	aNewWin.focus();
  }
}

