function writeStage(docName) {
var myQueryString=document.location.search;

// remove the '?' sign if exists
if (myQueryString[0]='?') {
   myQueryString=myQueryString.substr(1, myQueryString.length-1);
}

//Output the flash object
document.write(
   '<object type="application/x-shockwave-flash" data="'+docName+'" width="400" height="260">\n'+
   '   <param name="movie" value="'+docName+'" />\n'+
   '   <param name="allowFullScreen" value="true" />\n'+
   '   <param name="salign" value="lt" />\n'+
   '   <param name="flashvars" value="'+myQueryString+'" />\n'+
   '</object>');	
}