﻿var xmlDocimgindex;
var vid_img_top;
  function indexshowtopimg(vid)
  {
     vid_img_top=vid;
     var filename="../xml/Index/indexshow.xml";
     if(window.ActiveXObject)
      {
         xmlDocimgindex=new ActiveXObject("Microsoft.XMLDOM");
         xmlDocimgindex.async="false"   
         xmlDocimgindex.load(filename); 
         indexgetvalue(); 
      }
      else if(document.implementation && document.implementation.createDocument)
      {
         xmlDocimgindex=document.implementation.createDocument("", "root", null); 
         xmlDocimgindex.load(filename); 
         xmlDocimgindex.onload=indexgetvalueff; 
      }
      else
      {
          return null;
      }
  }
  var sarval=''; 
  function indexgetvalue()
  {   
      var nodes=xmlDocimgindex.documentElement.childNodes;  
      
      if(nodes.item(0).childNodes.item(0).text.indexOf('.swf')<0)
        sarval= '<img src="../Index/images/index_show/'+ nodes.item(0).childNodes.item(0).text+'"  alt=""align="absbottom"  class="imgcss" />'
      else
        {
        sarval='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"   width="964"   height="150"><param   name=movie   value="../Index/images/index_show/'+ nodes.item(0).childNodes.item(0).text+'"><param   name="wmode"   value="transparent"><param   name=quality   value=high><embed src="../Index/images/index_show/'+ nodes.item(0).childNodes.item(0).text+'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="960" height="150"></embed></object>';

        } 
        
      //document.getElementById(vid_img_top).innerHTML=""+ nodes.item(0).childNodes.item(0).text;
      //nodes.item(0).childNodes.item(0).getAttribute('url');
  } 
  function indexgetvalueff(){
  
  if(xmlDocimgindex.getElementsByTagName("title")[0].childNodes[0].nodeValue.indexOf('.swf')<0)
     sarval= '<img src="../Index/images/index_show/'+xmlDocimgindex.getElementsByTagName("title")[0].childNodes[0].nodeValue+'"  alt=""align="absbottom"  class="imgcss" />'
     else
    {
            sarval='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"   width="964"   height="150"><param   name=movie   value="../Index/images/index_show/'+ xmlDocimgindex.getElementsByTagName("title")[0].childNodes[0].nodeValue+'"><param   name="wmode"   value="transparent"><param   name=quality   value=high><embed src="../Index/images/index_show/'+ xmlDocimgindex.getElementsByTagName("title")[0].childNodes[0].nodeValue+'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="960" height="150"></embed></object>';

     } 
    document.getElementById('topimage_a').innerHTML=sarval;
     // document.getElementById(vid_img_top).src= "../Index/images/index_show/"+xmlDocimgindex.getElementsByTagName("title")[0].childNodes[0].nodeValue;  
  } 

