/**
---------------------------------------------------------------------------------------------
        EplosNET 3.0.0 PHP keretrendszer 2001-2006
        Kancsal Zoltán - mail: kancsal.zoltan@proaction.hu
---------------------------------------------------------------------------------------------
	Javascript oldal nyomtatás - használatához kell egy <DIV id='printReady'>...</DIV>
---------------------------------------------------------------------------------------------
*/
function printSpecial()
{                                                                                                                      
if (document.getElementById != null)                                                                                   
{                                                                                                                      
var html = '<HTML><HEAD>';                                                                                             
var printreadyElem = document.getElementById("printready");                                                            
if (printreadyElem != null)                                                                                            
{                                                                                                                      
	var headTags = document.getElementsByTagName("head");                                                                  
	if (headTags.length > 0){
        html += headTags[0].innerHTML;                                                                                 
        var r=headTags[0].innerHTML.match(/[^\'\"\=]+\.css/);                                                          
        if(r){                                                                                                         
        if (window.XMLHttpRequest) {                                                                                   
            http_request = new XMLHttpRequest();                                                                       
            if (http_request.overrideMimeType) http_request.overrideMimeType('text/css');                              
        } else if (window.ActiveXObject) {                                                                             
            try {                                                                                                      
                http_request = new ActiveXObject("Msxml2.XMLHTTP");                                                    
            } catch (e) {                                                                                              
                try {                                                                                                  
                    http_request = new ActiveXObject("Microsoft.XMLHTTP");                                             
                } catch (e) {r=0;}
            }                                                                                                          
                                                                                                                       
        } else r=0;
		if(r){
        	http_request.open('GET', r, false);                                                                            
        	http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");                            
       		http_request.send(null);                                                                                       
        	html+=(http_request.status==200?"\n<STYLE type='text/css'>\n"+http_request.responseText+'\n</STYLE>\n':'');    
		}
        }                                                                                                              
	}                                                                                                                      
	html += '</HE' + 'AD><BOD' + 'Y leftmargin="20" topmargin="20" marginwidth="20" marginheight="20" rightmargin="20" bottommargin="20" onload="setTimeout(\'window.print();\',100);">';                                                                                  
	html += printreadyElem.innerHTML;                                                                                      
}                                                                                                                      
else                                                                                                                   
{                                                                                                                      
	alert("Az oldalnak nem létezik nyomtatható verziója!\nCould not find the printable version of this page");             
	return;                                                                                                                
}                                                                                                                      
                                                                                                                       
html += '</BO' + 'DY></HT' + 'ML>';                          
                                                                                                                       
var printWin = window.open("","printSpecial","width=650, height=650, menubar=1, toolbar=1, location=0,status=0,scrollbars=1");                                                                                               
printWin.document.open();                                                                                              
printWin.document.write(html);                                                                                         
printWin.document.close();                                                                                             
}
}                                                                                                                      



function PopUpFlash(flashURL)
{
var posLeft=window.screen.width/2 - 600/2;
var posTop=window.screen.height/2 - 600/2;

newWindow = window.open("","newWindow","width=600,height=600,scrollbars=no,left="+posLeft+",top="+posTop);
newWindow.document.open();
newWindow.document.write('<htm'+'l><t'+'itle>BMS</t'+'itle><bo'+'dy bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">');
newWindow.document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="600" height="600">');
newWindow.document.write('<param name="MOVIE" value="http://www.bms.hu/php_images/flash/'+flashURL+'.swf">');
newWindow.document.write('<param name="QUALITY" value="HIGH">');
newWindow.document.write('<param name="BGCOLOR" value="#ffffff">');
newWindow.document.write('<embed src="http://www.bms.hu/php_images/flash/'+flashURL+'.swf"');
newWindow.document.write('quality="high"');
newWindow.document.write('type="application/x-shockwave-flash"');
newWindow.document.write('bgcolor="#ffffff"');
newWindow.document.write('width="600" height="600"></object>');
newWindow.document.write('</b'+'ody></ht'+'ml>');
newWindow.document.close();
newWindow.focus();
}
