// JavaScript Document
function addJavascript(jsname,pos) {
   var th = document.getElementsByTagName(pos)[0];
   var s = document.createElement('script');
   s.setAttribute('type','text/javascript');
   s.setAttribute('src',jsname);
   th.appendChild(s);
}
 
/* This does not appear to work in all browers, changed to static script tags in templates/header.php
addJavascript('/scripts/jquery/jquery-1.3.2.min.js','head'); 
addJavascript('/scripts/jquery/jquery.cycle.all.min.js','head'); 
addJavascript('/scripts/jquery/jquery.bgpos.js','head'); 
addJavascript('/scripts/jquery/jquery.hoverIntent.minified.js','head'); 
addJavascript('/scripts/roundies.js','head'); 
addJavascript('/scripts/swfobject.js','head'); 
addJavascript('/scripts/site_js_includes.js','head'); 
addJavascript('/scripts/AC_RunActiveContent.js','head'); 
addJavascript('/scripts/iepngfix_tile.js','head'); 
*/

function set_flash(swfFile, divName, swfWidth, swfHeight) {
   document.write('<div id="' + divName + '" style="cursor:pointer;">');
      AC_FL_RunContent(
         'codebase', 'https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
         'width', swfWidth,
         'height', swfHeight,
         'src', swfFile,
         'quality', 'high',
         'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
         'align', 'left',
         'play', 'true',
         'loop', 'true',
         'scale', 'showall',
         'wmode', 'transparent',
         'devicefont', 'false',
         'id', swfFile,
         'bgcolor', '',
         'name', swfFile,
         'menu', 'false',
         'allowFullScreen', 'false',
         'allowScriptAccess','sameDomain',
         'movie', swfFile,
         'salign', ''
         ); //end AC code

//   document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="');
//   document.write(swfWidth);
//   document.write('" height="');
//   document.write(swfHeight);
//   document.write('" id="');
//   document.write(swfFile);
//   document.write('" align="left">\n');
//   document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
//   document.write('<param name="allowFullScreen" value="true" />\n');
//   document.write('<param name="movie" value="');
//   document.write(swfFile);   
//   document.write('.swf" />\n');
//   document.write('<param name="quality" value="high" />\n');
//   document.write('<param name="wmode" value="transparent" />\n');
//   document.write('<param name="bgcolor" value="#ffffff" />\n');
//   document.write('<embed src="');
//   document.write(swfFile);     
//   document.write('.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="');
//   document.write(swfWidth);
//   document.write('" height="');
//   document.write(swfHeight);   
//   document.write('" name="');
//   document.write(swfFile);        
//   document.write('" align="left" allowscriptaccess="sameDomain" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /></embed>\n');  
//   document.write('</object>\n');
   document.write('</div>\n');
}

document.write('<!--[if IE 8]>');
document.write('<link type="text/css" rel="stylesheet" href="../includes/style.ie8.css" />');
document.write('<![endif]-->');
document.write('<!--[if IE 7]>');
document.write('<link type="text/css" rel="stylesheet" href="../includes/style.ie7.css" />');
document.write('<![endif]-->');
document.write('<!--[if IE 6]>');
document.write('<link type="text/css" rel="stylesheet" href="../includes/style.ie6.css" />');
document.write('<![endif]-->');
