// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 7;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;
// -----------------------------------------------------------------------------
function addFlash(swfName,w,h,params){
// Version check based upon the values entered above in "Globals"
var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

// Check to see if the version meets the requirements for playback
if (hasReqestedVersion) {
	// if we've detected an acceptable version
	// embed the Flash Content SWF when all tests are passed
    document.write('<object type="application/x-shockwave-flash" data="'+swfName+'?'+params+'" width="'+w+'" height="'+h+'"><param name="movie" value="'+swfName+'?'+params+'" /><param name="wmode" value="opaque" /></object>');
} else {  // flash is too old or we can't detect the plugin
	var alternateContent = 'Puslapio peržiūrai reikalinga naujesnė <i>Flash</i> versija.<BR><a target="blank" href=http://www.adobe.com/go/getflash/>Atsisiurbti naujesnę versija <i>Flash</i></a>';
	document.write(alternateContent);  // insert non-flash content
}
}
  
 /* function addFlash(swfName,w,h,params){
  document.write('<object type="application/x-shockwave-flash" data="'+swfName+'?'+params+'" width="'+w+'" height="'+h+'"><param name="movie" value="'+swfName+'?'+params+'" /><param name="wmode" value="opaque" /></object>');
  }*/
  function openindex(mystring, address){
    OpenWindow=window.open('', 'newwin', 'toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=600, height=400');
    OpenWindow.document.write('<!DOCTYPE html PUBLIC \""-//W3C//DTD XHTML 1.0 Strict//EN\"" \""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"">');
    OpenWindow.document.write('<html><head><meta http-equiv=\""Content-Type\"" content=\""text/html; charset=windows-1257\""/>');
    OpenWindow.document.write('<title>Spausdinimas</title><link href="../Styles/main.css"" rel="stylesheet" type="text/css" /><style><link href="/Styles/style.css" rel="stylesheet" type="text/css" /><style>div#texts{overflow:visible;}span#printeris{display:none;}div {text-align:left;}</style></head>');
    OpenWindow.document.write('<body style="background-color:white;text-align:left;">');
    OpenWindow.document.write('<div><span>'+address+'</span></div><br><br>');
    OpenWindow.document.write(mystring);

    OpenWindow.document.write('</body></html>');
  }
  
    function openindex2(mystring, address, title){
    if(title=="") title="Spausdinimas";
    OpenWindow=window.open('', 'newwin', 'toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=600, height=400');
    OpenWindow.document.write('<!DOCTYPE html PUBLIC \""-//W3C//DTD XHTML 1.0 Strict//EN\"" \""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"">');
    OpenWindow.document.write('<html><head><meta http-equiv=\""Content-Type\"" content=\""text/html; charset=windows-1257\""/>');
    OpenWindow.document.write('<title>'+title+'</title><link href="../Styles/main.css"" rel="stylesheet" type="text/css" /><style><link href="/Styles/style.css" rel="stylesheet" type="text/css" /><style>div#texts{overflow:visible;}span#printeris{display:none;}div {text-align:left;}</style></head>');
    OpenWindow.document.write('<body style="background-color:white;text-align:left;">');
    OpenWindow.document.write('<div><span>'+address+'</span></div><br><br>');
    OpenWindow.document.write(mystring);

    OpenWindow.document.write('</body></html>');
  }
  
  
  /* flash banners */
  function flashbanner(Height, Width, Image_Src_Path ){
           document.write('<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"' +
           'height="' + Height + '" width="' + Width + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' +
           'viewastext>' +
           '<param name="_cx" value="6615">' +
           '<param name="_cy" value="3016">' +
           '<param name="FlashVars" value="">' +
           '<param name="Movie" value="' + Image_Src_Path + '">' +
           '<param name="Src" value="' + Image_Src_Path + '">' +
           '<param name="WMode" value="Opaque">' +
           '<param name="Play" value="-1">' +
           '<param name="Loop" value="-1">' +
           '<param name="Quality" value="High">' +
           '<param name="SAlign" value="">' +
           '<param name="Menu" value="-1">' +
           '<param name="Base" value="">' +
           '<param name="AllowScriptAccess" value="always">' +
           '<param name="Scale" value="ShowAll">' +
           '<param name="DeviceFont" value="0">' +
           '<param name="EmbedMovie" value="0">' +
           '<param name="BGColor" value="">' +
           '<param name="SWRemote" value="">' +
           '<param name="MovieData" value="">' +
           '<embed src="' + Image_Src_Path + '"' +
           'quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"' +
           'height="' + Height + '" width="' + Width + '"></embed>' +
           '</object>');
}