// JavaScript Document
<!--

// 
function open_file(_fname)
	{
		window.open(_fname)
	}

  function on_over(_item)
      {
	    var position;
		position = document.getElementById(_item);
		position.style.backgroundColor="#FFFFFF";
		position.style.background = "url(./images/bg_submenu_r.jpg)";
		position.style.border= "1px solid #F5F5F5";
	  }
	  
  function on_out(_item)
      {
	    var position;
		position = document.getElementById(_item);
		position.style.backgroundColor="#f1f1f1";	
		position.style.background = "url(./images/bg_submenu.jpg)";		
		position.style.border= "1px solid #f1f1f1";
	  }
  function set_image(_item, _image)
      {
	     var __item;
		 __item = document.getElementById(_item);
		 __item.src = _image;
	  }

   function mmenu(_item, operator)
   {
     var menu, operator;
	 menu = document.getElementById(_item);
	 
	 switch(operator)
	   {
		case 'on':
			    menu.style.backgroundColor="#F5951D";
				menu.style.background = "url(./images/bg_button_r.jpg)";
				menu.style.cursor = "pointer";
				menu.style.border="1px solid #006699";
		 		break;
		case 'off':
			    menu.style.backgroundColor="#466FB2";
				menu.style.background = "url(./images/bg_button.jpg)";
				menu.style.border="1px solid #6184BD";
				break;
		default:
				menu.style.backgroundColor="#466FB2";
	   }
		
   }

  function on_over1(_item)
      {
	    var position, info, info1, tabs;
		tabs = document.getElementById('doradztwo');
			   tabs.style.background = "url(./images/doradztwo.gif)";
		tabs = document.getElementById('szkolenia');
			   tabs.style.background = "url(./images/szkolenia.gif)";
		tabs = document.getElementById('wydawnictwa');
			   tabs.style.background = "url(./images/wydawnictwa.gif)";
		tabs = document.getElementById('projektowanie');
			   tabs.style.background = "url(./images/projektowanie.gif)";	   			   
			   
		position = document.getElementById(_item);		
		info = document.getElementById('info_box');
		info1 = document.getElementById('infobox');
		
//		info.style.border="1px solid #FF0000";
//		position.style.backgroundColor="#FCB94C";
		position.style.cursor = "pointer";
		info1.style.display = '';
		
		switch(_item)
		  {
		    case 'doradztwo':
			     info.style.background = "url(./images/bg_info_dor.jpg)";
			     info.innerHTML = "<div name=\"info_div\" id=\"info_div\"><b>PTPiREE - doradztwo</b><br />Opracowania eksperckie, analizy z zakresu: <br />techniki, prawa, funduszy europejskich, ekonomii...</div>";
				  info.style.border="1px solid #F5951D";			
 		 		  position.style.background = "url(./images/doradztwo_r.gif)";
			      break;
		    case 'szkolenia':
 			      info.style.background = "url(./images/bg_info.jpg)";
   			      info.innerHTML = "<div name=\"info_div\" id=\"info_div\"><b>PTPiREE - szkolenia</b><br />Szkolenia, seminaria, konferencje, wyjazdy specjalistyczne m.in. z zakresu:<br />prawa energetycznego, zagadnień technicznych, informatycznych, ekonomicznych, łączności, marketingu, funduszy europejskich... </div>";
				  info.style.border="1px solid #6AADF8";
 		 		  position.style.background = "url(./images/szkolenia_r.gif)";
				  break;
		    case 'wydawnictwa':
			      info.style.background = "url(./images/bg_info_wyda.jpg)";
 			      info.innerHTML = "<div name=\"info_div\" id=\"info_div\"><b>PTPiREE - wydawnictwa</b><br />Albumy typizacyjne, książki, instrukcje eksploatacji, programy komputerowe, filmy, miesięczniki...</div>";		
				  info.style.border="1px solid #018532";	
 		 		  position.style.background = "url(./images/wydawnictwa_r.gif)";
				  break;
		    case 'projektowanie':
				  info.style.background = "url(./images/bg_info_proj.jpg)";
			      info.innerHTML = "<div name=\"info_div\" id=\"info_div\"><b>PTPiREE - projektowanie</b><br />Opracowywanie i wydawanie katalogów typizacyjnych linii elektroenergetycznych i stacji SN/nn, pomoc przy projektowaniu, baza danych producentów... </div>";
				  info.style.border="1px solid #DA6464";		
 		 		  position.style.background = "url(./images/projektowanie_r.gif)";
				  break;		   
		    default:
    		      info.innerHTML = "";			
		
		  }
		  
	  }
	  
  function on_out1(_item)
      {
	    var position, info, tabs;

		tabs = document.getElementById('doradztwo');
			   tabs.style.background = "url(./images/doradztwo.gif)";
		tabs = document.getElementById('szkolenia');
			   tabs.style.background = "url(./images/szkolenia.gif)";
		tabs = document.getElementById('wydawnictwa');
			   tabs.style.background = "url(./images/wydawnictwa.gif)";
		tabs = document.getElementById('projektowanie');
			   tabs.style.background = "url(./images/projektowanie.gif)";	   			   

		position = document.getElementById(_item);
		info = document.getElementById('infobox');
//		position.style.backgroundColor="#F3FBFE";
    	position.style.cursor = "default";
 	    info.style.display = 'none';
	  }
	  
  function on_over2(_item)
      {
	    var position;
		position = document.getElementById(_item);
		position.style.border= "1px solid #316AC5";
		position.style.backgroundColor="#FCB94C";
	  }
	  
  function on_out2(_item)
      {
	    var position;
		position = document.getElementById(_item);
		position.style.border= "0px none #E9E9E9";
		position.style.backgroundColor="#E9E9E9";
	  }	  


// main menu
function open_menu(menu_item) {

		switch(menu_item)
		  {
		    case 'menu1_1':
				document.location="http://www.ptpiree.pl/?d=1";
				break;
		    case 'menu1_2':
				document.location="http://www.ptpiree.pl/?d=2";
				break;
		    case 'menu1_3':
				document.location="http://www.ptpiree.pl/?d=3";
				break;								
		    case 'menu1_4':
//				document.location="http://www.ptpiree.pl/ptpiree/?d=4&s=press&a=lista";
				document.location="http://www.ptpiree.pl/?d=4&s=press&a=lista";
				break;
		    case 'menu1_5':
				document.location="http://www.ptpiree.pl/?d=5";
				break;
		    case 'menu1_6':
				document.location="http://www.ptpiree.pl/?d=6";
				break;
		    case 'menu1_7':
				document.location="http://www.ptpiree.pl/?d=7";
				break;
		    case 'menu1_8':
				document.location="http://www.ptpiree.pl/?d=8";
				break;
		    case 'menu1_9':
				document.location="http://www.ptpiree.pl/?d=9";
				break;	
			default:
				document.location="http://www.ptpiree.pl";				

		}																			
}

function open_submenu(menu_item) {
		switch(menu_item)
		  {
		    case 'submenu1_1':
				document.location="?d=4&s=press&a=lista";
				break;
		    case 'submenu1_2':
				document.location="?d=4&s=archive&a=form";
				break;
		    case 'submenu1_3':
				document.location="?d=4&s=rtv&a=lista";
				break;
		    case 'submenu1_4':
				document.location="?d=4&s=news&a=lista";
				break;
		    case 'submenu1_5':
				document.location="?d=4&s=info&a=lista";
				break;
		    case 'submenu1_6':
				document.location="?d=4&s=study&a=lista";
				break;				
			default:
				document.location="?d=4&s=press&a=lista";			

		}				
																

}



   function switch_text()
      {
	    var _art;
		
		_art = document.getElementById('art');
		if(_art.style.display == 'none')
			_art.style.display = '';
		else
		    _art.style.display = 'none';
	  }




DayName = new Array(7)
DayName[0] = "niedziela"
DayName[1] = "poniedziałek"
DayName[2] = "wtorek"
DayName[3] = "środa"
DayName[4] = "czwartek"
DayName[5] = "piątek"
DayName[6] = "sobota"

MonthName = new Array(12)
MonthName[0] = "stycznia"
MonthName[1] = "lutego"
MonthName[2] = "marca"
MonthName[3] = "kwietnia"
MonthName[4] = "maja"
MonthName[5] = "czerwca"
MonthName[6] = "lipca"
MonthName[7] = "sierpnia"
MonthName[8] = "września "
MonthName[9] = "października"
MonthName[10] = "listopada"
MonthName[11] = "grudnia"

function getDateStr(){
    var Today = new Date()
    var WeekDay = Today.getDay()
    var Month = Today.getMonth()
    var Day = Today.getDate()
    var Year = Today.getFullYear()

    if(Year <= 99)
        Year += 1900

    return "<span align='right' class='white_text_header'>"+DayName[WeekDay] + ", "+ Day + " " + MonthName[Month] + " "+Year+";</span>"
}

function activate() {

	if (navigator.appName == "Microsoft Internet Explorer") {
		
		var arrElements = new Array(3);
		arrElements[0] = "object";
		arrElements[1] = "embed";
		arrElements[2] = "applet";
			
		for (n = 0; n < arrElements.length; n++) {
		
			replaceObj = document.getElementsByTagName(arrElements[n]);
			
			for (i = 0; i < replaceObj.length; i++ ) {	
				parentObj = replaceObj[i].parentNode;			
				newHTML = parentObj.innerHTML;
				parentObj.removeChild(replaceObj[i]);
				parentObj.innerHTML = newHTML;
			
				}
			}
		}
	}

-->
		
