<!--

var _cmSplit = new Object ();		// indicate that the item is a menu split  //przeniesione z jsMenu.js

var bvMenu0 =
[
		[null, 'O FIRMIE', '/', '_self', 'O FIRMIE'],
		[null, 'PROMOCJE', 'serwis.html?10', '_self', 'PROMOCJE'],
		[null, 'OFERTA', 'serwis.html?21', '_self', 'PRODUKTY',
		[null, 'Styropian', 'serwis.html?21', '_self', 'Styropian'],
		[null, 'Polistyren ekstrudowany (XPS)', 'serwis.html?22', '_self', 'Polistyren ekstrudowany (XPS)'],
		[null, 'Wełna mineralna', 'serwis.html?23', '_self', 'Wełna mineralna'],
		[null, 'Systemy dociepleń', 'serwis.html?29', '_self', 'Systemy dociepleń'],
		[null, 'Systemy płyt kartonowo-gipsowych', 'serwis.html?24', '_self', 'Systemy płyt kartonowo-gipsowych'],
		[null, 'Systemy zamocowań', 'serwis.html?25', '_self', 'Systemy zamocowań'],
		[null, 'Papy termozgrzewalne', 'serwis.html?28', '_self', 'Papy termozgrzewalne'],
		[null, 'Płyty poliuretanowe', 'serwis.html?19', '_self', 'Płyty poliuretanowe'],
		[null, 'Rusztowania fasadowe', 'sklep/nowy//index.php?cat_id=58&page=0&view=0&sort=default', '_self', 'Rusztowania fasadowe'],
	],
		[null, 'ZAKUPY', 'sklep/nowy/index.php', '_self', 'ZAKUPY',
		[null, 'Sklep Internetowy', 'sklep/nowy/index.php', '_self', 'Sklep PW ARIS'],
		[null, 'Cennik materiałów', 'serwis.html?26', '_self', 'Cenniki'],
		[null, 'Rusztowania fasadowe', 'sklep/nowy//index.php?cat_id=58&page=0&view=0&sort=default', '_self', 'Rusztowania'],
		[null, 'Kalkulatory kosztów', 'serwis.html?27', '_self', 'Kalkulator'],
	],
		[null, 'GALERIA', 'docieplenia.html', '_self', 'GALERIA',
		[null, 'Docieplenia', 'docieplenia.html', '_self', 'Docieplenia'],
		[null, 'Budowy', 'budowy.html', '_self', 'Budowy'],
		[null, 'Pomysły', 'pomysly.html', '_self', 'Pomysły'],
	],
		[null, 'KONKURSY', 'konkurs.html', '_self', 'KONKURSY'],
		[null, 'PORADY', 'porady.html', '_self', 'PORADY'],
		[null, 'REKLAMA', 'partnerzy.html', '_self', 'REKLAMA'],
		[null, 'KONTAKT', 'kontakt.html', '_self', 'KONTAKT']
];



var pwPageData = 
[
	[0, 'CENTRUM DOCIEPLEŃ',1220,0,-1,-1],
	[10, 'PROMOCJE',2100,200,-1,-1],
	[19, 'OFERTA - Płyty poliuretanowe',0, 200, 28,-1],
	[20, 'OFERTA',0,0],
	[21, 'OFERTA - STYROPIAN',6100, 200,-1,22],
	[22, 'OFERTA - Polistyren ekstrudowany (XPS)',1100,200,21,23],
	[23, 'OFERTA - WEŁNA MINERALNA',0, 200,22,29],
	[24, 'OFERTA - Systemy płyt kartonowo-gipsowych',970, 210,29,25],
	[25, 'OFERTA - SYSTEMY ZAMOCOWAŃ',0, 200,24,28],
	[26, 'OFERTA - CENNIK',6800, 200,-1,-1],
	[27, 'KALKULATOR',750, 200,-1,-1],
	[28, 'OFERTA - Papy termorozgrzewalne',0, 200,25,19],
	[29, 'OFERTA - SYSTEMY DOCIEPLEŃ',2800,205,23,24],
	[30, 'GALERIA',0,0],
	[31, 'GALERIA - DOCIEPLENIA',2200,0,-1,32],
	[32, 'GALERIA - BUDOWY',620,0,31,-1],
	[33, 'GALERIA - POMYSŁY',2200,0,-1,32],
	[40, 'REKLAMA',750,0,-1,-1],
        [41, 'PROJEKTY KB',1300,0,-1,-1],
        [42, 'IMMOFINANCE',0,0,-1,-1],
	[50, 'PORADY', 2500, 200,-1,-1],
	[60, 'KONTAKT', 1100,0,-1,-1],
	[70, 'ZAKUPY - SKLEP PW ARIS',0,0,-1,-1],
	[80, 'KONKURSY',0,0,-1,-1],
];

var cmThemeDefault0 =
{
   mainFolderLeft: '\&nbsp;\&nbsp;\&nbsp;',
   mainFolderRight: '\&nbsp;\&nbsp;',
   mainItemLeft: '\&nbsp;\&nbsp;\&nbsp;',
   mainItemRight: '\&nbsp;\&nbsp;',
   folderLeft: '\&nbsp;\&nbsp;',
   folderRight: '\&nbsp;\&nbsp;',
   itemLeft: '\&nbsp;\&nbsp;',
   itemRight: '\&nbsp;\&nbsp;',
   mainSpacing: 0,
   subSpacing: 0,
   delay: 100
};

// Global variables
var PageCommand
var MenuID
var PageHeight
var PageLink=""
var PageURL="";

function ParseCommandLine() {
	
	if (location.href.indexOf("?") == -1) {
		return 0
	}
	
	// Parse any command line arguments
	urlQuery = location.href.split("?")

	urlTerms = urlQuery[1].split(",")
	if (urlTerms[0] != null) 
		{MenuID = parseInt(urlTerms[0])}
	else
		{MenuID = 0};

	if (urlTerms[1] != null)
		{PageHeight = parseInt(urlTerms[1])}
	else
		{PageHeight=0};

	if (urlTerms[2] != null) 
		{PageLink = urlTerms[2]}
	else
		{PageLink = ""};

	if (urlTerms[3] != null) 
		{PageURL = urlTerms[3]
		//alert(PageURL)
		}
	else
		{PageURL = ""};

		
}

function ParseCommandLine2() {
	
	//alert(location.href)
	if (location.href.indexOf("?") == -1) {
		return 0;
	}
	
	// Parse any command line arguments
	urlQuery = location.href.split("?")
	urlTerms = urlQuery[1].split(",")

	if (urlTerms[0] != null) 
		{MenuID = parseInt(urlTerms[0])}
	else
		{MenuID = 0}

	if (urlTerms[1] != null) 
		{PageLink = urlTerms[1]}
	else
		{PageLink = ""};

	if (urlTerms[2] != null) 
		{PageURL = urlTerms[2]}
	else
		{PageURL = ""};

}

function GetPageTitle(nMenuId){
	var i;
	
	return "PW ARIS systemy dociepleń, styropian, materiały budowlane, obsługa inwestycji, docieplenia";
/*
	for (i = 0; i < pwPageData.length; ++i)
	{
		if (pwPageData[i][0] == nMenuId)
		{	
			return "PW ARIS - " + pwPageData[i][1] + " (systemy dociepleń, styropian, materiały budowlane, obsługa inwestycji, docieplenia)";
		
		}
	}
*/	
}

function GetPageHeight(nMenuId){
	var i;
	
	for (i = 0; i < pwPageData.length; ++i)
	{
		if (pwPageData[i][0] == nMenuId)
		{
			return pwPageData[i][2]	;
		}
	}
	return 0;
}

function GetPageMenuWidth(nMenuId){
	var i;
	
	for (i = 0; i < pwPageData.length; ++i)
	{
		if (pwPageData[i][0] == nMenuId)
		{
			return pwPageData[i][3]	;
		}
	}
	return 0;
}

function GetPagePos(nMenuId){
	var i;
	
	for (i = 0; i < pwPageData.length; ++i)
	{
		if (pwPageData[i][0] == nMenuId)
			return i	;
	}
	return 0;
}



function init() {
	// Make output strings from theme.js and data.js
    	//outputURL = themeURL.replace(replacementChar, URL);
    	//outputURL = outputURL.replace(replacementChar, URL);

	MenuID = 0;
	PageHeight = 0;
	PageLink = "";
	ParseCommandLine();

	if (PageHeight==0) 
		PageHeight = GetPageHeight(MenuID);
	
	if (PageHeight==0) {
		if (screen.availHeight>580)
			PageHeight=580;
		else
			PageHeight=500;
	}		
	if (PageHeight<300){
		PageHeight=300
	}
	if (PageHeight>10000) {
		PageHeight=10000
	}
	//document.title = GetPageTitle(MenuID);
	//alert(GetPageTitle(MenuID));
}

function PrepareSubPageData(){
	
	MenuID = 0;
	PageLink = "";
	PageURL=""
	ParseCommandLine2();
	//top.document.title = GetPageTitle(MenuID);
	//alert(GetPageTitle(MenuID));
}


function PrepareFrameLayout(){	
	
	
	var nMenuWidth = GetPageMenuWidth(MenuID);
	if (nMenuWidth<=0)	
		nMenuWidth=200

	//alert("ID=" + MenuID + ", MenuWidth="+nMenuWidth + ", PageURL="+PageURL + ", PageLink="+PageLink)

	document.write('<FRAMESET cols="' + nMenuWidth + ', *">');
	
	document.write('<FRAME name="ContentMenu" src="Content'+MenuID+'Menu.html" frameborder=0 noresize scrolling=no  >');
	if (PageURL!="")
	{
		if (PageLink == "")
			document.write('<FRAME name="ContentBody" src="'+PageURL+'.html" frameborder=0 noresize >');
		else
			document.write('<FRAME name="ContentBody" src="'+PageURL+'.html?' + PageLink + '" frameborder=0 noresize >');

		//alert("url=" + PageURL + " Link= " + PageLink)
		//alert('<FRAME name="ContentBody" src="'+PageURL+'.html?' + PageLink + '" frameborder=0 noresize >');

	}
	else if (PageLink=="")
		document.write('<FRAME name="ContentBody" src="Content'+MenuID+'.html" frameborder=0 noresize scrolling=auto>');
	else
		document.write('<FRAME name="ContentBody" src="Content'+MenuID+'.html#'+PageLink+'" frameborder=0 noresize >');
  	document.write('</FRAMESET>')
	document.write('<NOFRAMES>')
      	document.write('<P>Twoja przeglądarka nie obsługuje ramek i nie potrafi wyświetlić tej strony. Przepraszamy</P>')
  	document.write('</NOFRAMES>')

};

function LoadContent2() {
}

function LoadContent() {
	
	var PageCommand = '<IFRAME src="Content';
	if (GetPageMenuWidth(MenuID)==0)
		PageCommand += MenuID;	

	if (PageURL!="")
		PageCommand += '.html?' + MenuID + ',' + PageLink + ','+PageURL+'" width="1010" height="' + PageHeight +'" scrolling="auto" frameborder="0">';
	else if (PageLink=="")
		PageCommand += '.html?' + MenuID + '" width="1010" height="' + PageHeight +'" scrolling="auto" frameborder="0">';
	else
		PageCommand += '.html?' + MenuID + ','+ PageLink + '" width="1010" height="' + PageHeight +'" scrolling="auto" frameborder="0">';
	
	//alert("Komenda "+PageCommand);
	document.write(PageCommand);
}

function InsertNextPrev(nMenuId)
{
	var pos = GetPagePos(nMenuId);
	var nPrevIdx, nNextIdx;
	//alert ("menu: " + nMenuId + " - " + pos)
	if (pos>0)
	{
		nPrevIdx = pwPageData[pos][4]
		nNextIdx = pwPageData[pos][5]
		//alert("" + nPrevIdx + " - " + nNextIdx)
		if (nNextIdx >= 0 || nPrevIdx >= 0)
		{
			document.write('<DIV align="right">');

			if (nPrevIdx >= 0)
				document.write('<A class="NextPrev" onclick="top.location.href = \'serwis.html?' + nPrevIdx + '\'" onMouseOut="this.style.color=\'navy\'" onMouseOver="this.style.color=\'red\'">')
			else
				document.write('<A class="NextPrevDisabled">');
			document.write('&lt;wstecz</A>'); //&nbsp;&nbsp;');

			if (nNextIdx >= 0)
				document.write('<A class="NextPrev" onclick="top.location.href = \'serwis.html?' + nNextIdx + '\'" onMouseOut="this.style.color=\'navy\'" onMouseOver="this.style.color=\'red\'">')
			else
				document.write('<A class="NextPrevDisabled"> ');
			document.write('dalej&gt;</A>');

			document.write('</DIV>') 
		}
	}
}

function ShowNewsMark(nNo)
{
	document.write('<SPAN class="TableMenuPic">');
	document.write('&nbsp;&nbsp;<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write('codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"');

	switch (nNo)
	{
	case 2:
		document.write('ID=news_02 WIDTH=25 HEIGHT=20 align="bottom" border=0>');
		document.write('<PARAM NAME=movie VALUE="news_02.swf"><PARAM NAME=menu VALUE=false>');
		document.write('<PARAM NAME=quality VALUE=best><PARAM NAME=bgcolor VALUE=#F2F2F8>');
		document.write('<EMBED src="news_02.swf" quality=high bgcolor=#F2F2F8 menu=false WIDTH=25 HEIGHT=20');
	break;
	case 3:
		document.write('ID=news_03 WIDTH=25 HEIGHT=20 align="bottom" border=0>');
		document.write('<PARAM NAME=movie VALUE="news_03.swf"><PARAM NAME=menu VALUE=false>');
		document.write('<PARAM NAME=quality VALUE=best><PARAM NAME=bgcolor VALUE=#F2F2F8>');
		document.write('<EMBED src="news_03.swf" quality=high bgcolor=#F2F2F8 menu=false WIDTH=25 HEIGHT=20');
	break;
	case 4:
		document.write('ID=news_04 WIDTH=25 HEIGHT=20 align="bottom" border=0>');
		document.write('<PARAM NAME=movie VALUE="news_04.swf"><PARAM NAME=menu VALUE=false>');
		document.write('<PARAM NAME=quality VALUE=best><PARAM NAME=bgcolor VALUE=#F2F2F8>');
		document.write('<EMBED src="news_04.swf" quality=high bgcolor=#F2F2F8 menu=false WIDTH=25 HEIGHT=20');
	break;

	default:
		document.write('ID=news_01 WIDTH=25 HEIGHT=20 align="bottom" border=0>');
		document.write('<PARAM NAME=movie VALUE="news_01.swf"><PARAM NAME=menu VALUE=false>');
		document.write('<PARAM NAME=quality VALUE=best><PARAM NAME=bgcolor VALUE=#F2F2F8>');
		document.write('<EMBED src="news_01.swf" quality=high bgcolor=#F2F2F8 menu=false WIDTH=25 HEIGHT=20');
	break;
	}

	document.write('align="bottom" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">	</EMBED>');
	document.write('</OBJECT></SPAN>');
}

function CheckMainPageRedirection()
{	
	if (window.top != window) {
		window.top.location = "http://www.pwaris.pl";
	}
}

function InsertHeadAnimation()
{
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"	ID=PWAris_Zmiana WIDTH="800" HEIGHT="50" Border=0 align="top">');
	document.write('<PARAM NAME=movie VALUE="news.swf">');
	document.write('<PARAM NAME=quality VALUE=high>');
	document.write('<PARAM NAME=bgcolor VALUE="#000080">');
	document.write('<EMBED src="news.swf" quality=high bgcolor=#000080 WIDTH="900" HEIGHT="52" align="top" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
	document.write('</EMBED> ');
	document.write('</OBJECT>');
}

function InsertMainAnimation()
{
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" ID=PWAris_02 WIDTH="800" HEIGHT=105 Border=0 >');
	document.write('<PARAM NAME=movie VALUE="PWAris_02.swf">');
	document.write('<PARAM NAME=quality VALUE=high>');
	document.write('<PARAM NAME=bgcolor VALUE=#004080>');
	document.write('<EMBED src="PWAris_02.swf" quality=high bgcolor="#004080" WIDTH="800" HEIGHT=105 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
	document.write('</EMBED>');
	document.write('</OBJECT>');
}

function InsertMainMenu()
{
	document.write('<TABLE  width="100%" cellspacing="0px" margins="0px" border=0>');	//<!-- rules="all" frame="all"-->
	document.write('<TR><TD valign="top">');
        	document.write('<DIV align="left" style="z-index:1">');
        	document.write('<DIV ID=MenuID0></DIV>');
	        cmDraw('MenuID0', bvMenu0, 'hbr', cmThemeDefault0, 'ThemeDefault0');
		document.write('</DIV>');
	document.write('</TD><TD width="80px">');
		document.write('<a href="en/index.html"><img border=1 alt="English version" src="data/flag_GB.bmp"></A>&nbsp;');
		document.write('<a href="de/index.html"><img border=1 alt="Deutsche Version" src="data/flag_DE.bmp"></A> ');
		document.write('<a href="/"><img border=1 alt="Wersja polska" src="data/flag_PL.bmp"></A>');
	document.write('</TD></TR>');
	document.write('</TABLE>');
}

function InsertPageFooter()
{
	document.write('<TR height="20px" class="PageFooterRow">'); //style=/'background:#004080 url("data/\PageHeader4.gif") repeat-x;/'>');
	document.write('<TD colspan=3 class="stopka">');
	document.write('<SPAN class="telefon">&nbsp;Centrum Dociepleń ARIS</SPAN> | Biuro Handlowe tel. <SPAN class="telefon">071-7937104, 7936074, 7936075</SPAN> | GG:<SPAN class="telefon">33530445</SPAN> | email:<a class="telefon" href="mailto:pwaris@pwaris.pl">pwaris@pwaris.pl</A>');
	document.write('</TD></TR>');
        document.write('<TR height=10><TD colspan=3 class="autor"><span class="offer">Styropian - System Dociepleń ARIS - Polistyren Ekstrudowany - Wełna Mineralna Cena - Styropapa - Systemy Ociepleń - BAUMIT OPEN</span><span>  <a class="autor" href="http://www.pwaris.pl/sitemap.html">Mapa Strony</a>\&nbsp;\&nbsp;\&nbsp;\&nbsp;</span><span>realizacja: <a class="autor" href="mailto:Albert@kadqs.pol.pl">Albert Wałczyk</a> &copy 2005-2009</span></TD></TR>');
}

function StartPageLayout()
{
	document.write('<TABLE  width="1010px" align="center"  cellspacing="0px" margins="0px" border=0>');

	document.write('<TR><TD bgcolor="#004080" valign="top" align="center">');
	InsertHeadAnimation();
	document.write('</TD></TR>');

	document.write('<TR><TD bgcolor="#004080" valign="top" align="center">');
	InsertMainAnimation();
	document.write('</TD></TR>');
	
	document.write('<TR height="31px" class="MainMenuRow">'); //style=/'background:#004080 url("data/\PageHeader3.gif") repeat-x scroll bottom/' height=31>');
	document.write('<TD valign="top">');
	InsertMainMenu();
	document.write('</TD></TR>');
	
	document.write('<TR><TD class="ContentBody">');
}

function EndPageLayout()
{
       	//LoadContent()
       	
	document.write('</IFRAME></TD></TR>');
	InsertPageFooter()
	document.write('</TABLE>');
}

-->

