function closeModel()
{  
   document.getElementById('instalacja').innerHTML = ''; 
}
      
function viewModel(id, autostart, top, right, bottom, left)
{ 
   // wymagany poprawny doctype:
   // http://www.w3.org/TR/REC-html40/struct/global.html#h-7.2
   // http://www.w3.org/TR/xhtml1/#strict
   var modelServer = 'http://www.virtualmodel.pl/swf/';
   var playerServer =  'http://www.virtualmodel.pl/';

   var width = 250;
   var height = 350;
   
   var virtualmodel = document.createElement('div');
   virtualmodel.setAttribute('id', "instalacja");
   virtualmodel.style.zIndex = '9999';
   virtualmodel.style.width = width+'px';
   virtualmodel.style.height = height+'px';
   
   // IE position fixed bug
   var IE6 = false /*@cc_on || @_jscript_version < 5.7 @*/;
   var isMSIE = /*@cc_on!@*/false;
   if(IE6) {
      virtualmodel.style.position = 'absolute';
      //http://kurs.browsehappy.pl/Bugi/BrakPositionFixed
   }else{
      virtualmodel.style.position = 'fixed';
   }
   


   virtualmodel.style.bottom =  bottom+'%'; 
   virtualmodel.style.right =  right+'%';

   

   flashCode  = '<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="'+width+'" height="'+height+'" >';
   flashCode += '<param name="movie" value="'+playerServer+'player.swf?file='+modelServer+'instalacja.flv&size=false&aplay=true&autorew=false&title=&vidwidth='+width+'&vidheight='+height+'&link=null">';
   flashCode += '<param name="quality" value="best" />';
   flashCode += '<param name="menu" value="false" />';
   flashCode += '<param name="wmode" value="transparent" />';
   flashCode += '<embed src="'+playerServer+'player.swf?file='+modelServer+'instalacja.flv&size=false&aplay=true&autorew=false&title=&vidwidth='+width+'&vidheight='+height+'&link=null" menu="false" quality="best" wmode="transparent" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"  bgcolor="#FFFFFF" width="'+width+'" height="'+height+'" name="film" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';
   flashCode += '</object>';

   
   virtualmodel.innerHTML = flashCode;
   
   document.body.appendChild(virtualmodel);

}



