// ---------------------------- //
// 			menu part			//
// ---------------------------- //
	var timeOn = null;
	var i = 0; 
	function hideAll() {
		for(var index = 1; index <= i;  index++) {
			changeMenuOut('m1tlm'+index);
		}
		clearTimeout(timeOn);
	}
	function hideMenu(menuItem) {
		str = "changeMenuOut('"+menuItem+"')";
		timeOn = setTimeout(str , 1500);
	}
	
	function changeMenuOver(menuItem) {
		hideAll();
		document.getElementById(menuItem).className='menuSelected'; 
		document.getElementById(menuItem+'_2').className='menuSelected';
		if(document.getElementById(menuItem+'_top') != undefined)
			document.getElementById(menuItem+'_top').style.visibility='visible';
	}
	function changeMenuOut(menuItem) {
		document.getElementById(menuItem).className='menuNotSelected'; 
		document.getElementById(menuItem+'_2').className='menuNotSelected'; 
		if(document.getElementById(menuItem+'_top') != undefined)
			document.getElementById(menuItem+'_top').style.visibility='hidden';
	}
// ---------------------------- //
// ---------------------------- //



// ---------------------------- //
// 			main part			//
// ---------------------------- //
	function newImage(arg) {
		if (document.images) {
			rslt = new Image();
			rslt.src = arg;
			return rslt;
		}
	}
	
	function changeImages() {
		if (document.images && (preloadFlag == true)) {
			for (var i=0; i<changeImages.arguments.length; i+=2) {
				document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
			}
		}
	}
	
	var preloadFlag = false;
	function preloadImages() {
		if (document.images) {
			id3_12_2002_m_04_3_12_2002_m_05_over = newImage("strony/images/3_12_2002_m_04-3_12_2002_m_.gif");
					id4_1_13_14_2003_m_04_4_1_13_14_2003_m_07_over = newImage("strony/images/4_1_13_14_2003_m_04-4_1_13_.gif");
			preloadFlag = true;
		}
	}
// ---------------------------- //
// ---------------------------- //


// ---------------------------- //
// 			word tags removing part			//
// ---------------------------- //

function CleanWord( html )
{
	html = html.replace(/<o:p>\s*<\/o:p>/g, "") ;
	html = html.replace(/<o:p>.*?<\/o:p>/g, "&nbsp;") ;
	
	// Remove mso-xxx styles.
	html = html.replace( /\s*mso-[^:]+:[^;"]+;?/gi, "" ) ;

	// Remove margin styles.
	html = html.replace( /\s*MARGIN: 0cm 0cm 0pt\s*;/gi, "" ) ;
	html = html.replace( /\s*MARGIN: 0cm 0cm 0pt\s*"/gi, "\"" ) ;

	html = html.replace( /\s*TEXT-INDENT: 0cm\s*;/gi, "" ) ;
	html = html.replace( /\s*TEXT-INDENT: 0cm\s*"/gi, "\"" ) ;

	html = html.replace( /\s*TEXT-ALIGN: [^\s;]+;?"/gi, "\"" ) ;

	html = html.replace( /\s*PAGE-BREAK-BEFORE: [^\s;]+;?"/gi, "\"" ) ;

	html = html.replace( /\s*FONT-VARIANT: [^\s;]+;?"/gi, "\"" ) ;

	html = html.replace( /\s*tab-stops:[^;"]*;?/gi, "" ) ;
	html = html.replace( /\s*tab-stops:[^"]*/gi, "" ) ;

	// Remove FONT face attributes.
	//if ( bIgnoreFont )
	//{
		html = html.replace( /\s*face="[^"]*"/gi, "" ) ;
		html = html.replace( /\s*face=[^ >]*/gi, "" ) ;

		html = html.replace( /\s*FONT-FAMILY:[^;"]*;?/gi, "" ) ;
	//}
	
	// Remove Class attributes
	html = html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3") ;

	// Remove styles.
	//if ( bRemoveStyles )
	html = html.replace( /<(\w[^>]*) style="([^\"]*)"([^>]*)/gi, "<$1$3" ) ;

	// Remove empty styles.
	html =  html.replace( /\s*style="\s*"/gi, '' ) ;
	
	html = html.replace( /<SPAN\s*[^>]*>\s*&nbsp;\s*<\/SPAN>/gi, '&nbsp;' ) ;
	
	html = html.replace( /<SPAN\s*[^>]*><\/SPAN>/gi, '' ) ;
	
	// Remove Lang attributes
	html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ;
	
	html = html.replace( /<SPAN\s*>(.*?)<\/SPAN>/gi, '$1' ) ;
	
	html = html.replace( /<FONT\s*>(.*?)<\/FONT>/gi, '$1' ) ;

	// Remove XML elements and declarations
	html = html.replace(/<\\?\?xml[^>]*>/gi, "") ;
	
	// Remove Tags with XML namespace declarations: <o:p></o:p>
	html = html.replace(/<\/?\w+:[^>]*>/gi, "") ;
	
	html = html.replace( /<H\d>\s*<\/H\d>/gi, '' ) ;

	html = html.replace( /<H1([^>]*)>/gi, '<div$1><b><font size="6">' ) ;
	html = html.replace( /<H2([^>]*)>/gi, '<div$1><b><font size="5">' ) ;
	html = html.replace( /<H3([^>]*)>/gi, '<div$1><b><font size="4">' ) ;
	html = html.replace( /<H4([^>]*)>/gi, '<div$1><b><font size="3">' ) ;
	html = html.replace( /<H5([^>]*)>/gi, '<div$1><b><font size="2">' ) ;
	html = html.replace( /<H6([^>]*)>/gi, '<div$1><b><font size="1">' ) ;

	html = html.replace( /<\/H\d>/gi, '</font></b></div>' ) ;
	
	html = html.replace( /<(U|I|STRIKE)>&nbsp;<\/\1>/g, '&nbsp;' ) ;

	// Remove empty tags (three times, just to be sure).
	html = html.replace( /<([^\s>]+)[^>]*>\s*<\/\1>/g, '' ) ;
	html = html.replace( /<([^\s>]+)[^>]*>\s*<\/\1>/g, '' ) ;
	html = html.replace( /<([^\s>]+)[^>]*>\s*<\/\1>/g, '' ) ;

	// Transform <P> to <DIV>
	var re = new RegExp("(<P)([^>]*>.*?)(<\/P>)","gi") ;	// Different because of a IE 5.0 error
	html = html.replace( re, "<div$2</div>" ) ;
	html = html.replace( "<p>", "<div>" ) ;
	html = html.replace( "</p>", "</div>" ) ;
	html = html.replace( "<P>", "<DIV>" ) ;
	html = html.replace( "</P>", "</DIV>" ) ;

	return html ;
}

function popup() {
  window.open("popup.html","popWindow",'width=680,height=470,resizable=0,scrollbars=no,menubar=no,top=50,left=100');
}

// ---------------------------- //
// ---------------------------- //