// version 1.0
// Use Document.write to dynamically load active content so interactive controls respond immediately
// This script is specifically for the Dreamweaver XML Slideshow extension used on the gnpi.org website by the gnpi centers slideshows.
// The following modifications were made to the slideshow pages:
//     1)  <script src="../Scripts/AC_DocumentWrite.js"></script> was added above the object class for the flash slideshow.
//           (this line calls this javascript file)
//     2) <script type="text/javascript">
//          AC_GetXMLfile('xml=../ukraine/imagesSlides/data0.xml')</script>
//          (this calls the function AC_GetXMLfile which is being passed the location of the XML file and then writting the required
//           lines to the web page so the Flash control is activated automatically - note: the location has to be modified for each instance of the slideshow).
//     3)  <noscript> and </noscript> tags are put around the <object> & < <embed> tag - one tag set used around both <object> & <embed>
//           (this tag will keep these lines from being read by the browser if the abouve script runs OK, otherwise the lines between these tags will 
//            be read by the browser).

function AC_GetXMLfile(args)
{
   var str1 = '<param name="flashvars" value="';
   str1 += args;
   str1 += '" />';
   
   var str2 = '<embed src="slideshow.swf" width="600" height="350" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" flashvars="';
   str2 += args;
   str2 += '"></embed>'
   
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="600" height="350">');
   document.write('<param name="movie" value="slideshow.swf">');
   document.write('<param name="quality" value="high" />');
   document.write('<param name="wmode" value="window">');
   document.write(str1);
   document.write(str2);
   document.write('</object>');
}
