<!--

var _cmSplit = new Object ();		// indicate that the item is a menu split  //przeniesione z jsMenu.js

var bvMenu0 =
[
	[null, 'ÜBER UNS', 'index.html', '_self', 'ÜBER UNS'],
//	[null, 'SCHNÄPPCHEN', 'index.html?10', '_self', 'SCHNÄPPCHEN'],
	[null, 'ANGEBOT', 'index.html?21', '_self', 'ANGEBOT',
		[null, 'Styropor', 'index.html?21', '_self', 'Styropor'],
		[null, 'Extradiertes Polistyren (XPS)', 'index.html?22', '_self', 'Extradiertes Polistyren (XPS)'],
		[null, 'Mineralwolle', 'index.html?23', '_self', 'Mineralwolle'],
		[null, 'Heizsystemen', 'index.html?29', '_self', 'Heizsystemen'],
		[null, 'System der Kartongipsplatten', 'index.html?24', '_self', 'System der Kartongipsplatten'],
		[null, 'Verbindern (Dübeln)', 'index.html?25', '_self', 'Verbindern (Dübeln)'],
		[null, 'Heißsiegelfähige Pappe', 'index.html?28', '_self', 'Heißsiegelfähige Pappe'],
		[null, 'Polyurethan-Platten', 'index.html?19', '_self', 'Polyurethan-Platten'],
		_cmSplit,
		[null, 'Preisliste', 'index.html?26', '_self', 'Preisliste'],
		[null, 'Kostenrechner', 'index.html?27', '_self', 'Kostenrechner'],
	],
//	[null, 'ZAKUPY', 'index.html?70', '_self', 'ZAKUPY',
//		[null, 'SKLEP', 'index.html?70', '_self', 'Sklep PW ARIS'],
//		_cmSplit,
//		[null, 'Cennik', 'index.html?26', '_self', 'Cenniki'],
//		[null, 'Kalkulator kosztów', 'index.html?27', '_self', 'Kalkulator'], 
//	],
	[null, 'REALISIERUNGEN', 'index.html?31', '_self', 'REALISIERUNGEN',
		[null, 'Erwärmungen', 'index.html?31', '_self', 'Erwärmungen'],
		[null, 'Bauten', 'index.html?32', '_self', 'Bauten'],
	],
//	[null, 'PARTNERS', 'index.html?40', '_self', 'PARTNERS'],
//	[null, 'RATSCHLÄGE', 'index.html?50', '_self', 'RATSCHLÄGE'],
	[null, 'KONTAKTDATEN', 'index.html?60', '_self', 'KONTAKTDATEN']
];

var pwPageData = 
[
	[0, 'ERWÄRMUNGSZENTRUM',720,0,-1,-1],
	[10, 'SCHNÄPPCHEN',585,200,-1,-1],
	[19, 'ANGEBOT - Polyurethan-Platten',0, 200, 28,-1],
	[20, 'ANGEBOT',0,0],
	[21, 'ANGEBOT - Styropor',3050, 200,-1,22],
	[22, 'ANGEBOT - Extradiertes Polistyren (XPS)',0,250,21,23],
	[23, 'ANGEBOT - Mineralwolle',0, 200,22,29],
	[24, 'ANGEBOT - System der Kartongipsplatten',970, 210,29,25],
	[25, 'ANGEBOT - Verbindern (Dübeln)',0, 200,24,28],
	[26, 'ANGEBOT - Preisliste',3200, 180,-1,-1],
	[27, 'KOSTENRECHNER',700, 200,-1,-1],
	[28, 'ANGEBOT - Heißsiegelfähige Pappe',0, 200,25,19],
	[29, 'ANGEBOT - Heizsystemen',1200,205,23,24],
	[30, 'REALISIERUNGEN',0,0],
	[31, 'REALISIERUNGEN - ERWÄRMUNGEN',2200,0,-1,32],
	[32, 'REALISIERUNGEN - BAUTEN',620,0,31,-1],
	[40, 'WYKONAWCY I PARTNERZY',0,0,-1,-1],
        [41, 'PROJEKTY KB',1300,0,-1,-1],
        [42, 'IMMOFINANCE',0,0,-1,-1],
	[50, 'RATSCHLÄGE', 2400, 200,-1,-1],
	[60, 'KONTAKTDATEN', 970,0,-1,-1],
	[70, 'ZAKUPY - SKLEP PW ARIS',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 "VBU ARIS, Erwärmungssysteme, Styropor, Baumaterialien, Investitionsbedienung, Erwärmungen";
/*
	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>5000) {
		PageHeight=5000
	}
	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="800" height="' + PageHeight +'" scrolling="auto" frameborder="0">';
	else if (PageLink=="")
		PageCommand += '.html?' + MenuID + '" width="800" height="' + PageHeight +'" scrolling="auto" frameborder="0">';
	else
		PageCommand += '.html?' + MenuID + ','+ PageLink + '" width="800" 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 = \'index.html?' + nPrevIdx + '\'" onMouseOut="this.style.color=\'navy\'" onMouseOver="this.style.color=\'red\'">')
			else
				document.write('<A class="NextPrevDisabled">');
			document.write('&lt;zurück</A>'); //&nbsp;&nbsp;');

			if (nNextIdx >= 0)
				document.write('<A class="NextPrev" onclick="top.location.href = \'index.html?' + nNextIdx + '\'" onMouseOut="this.style.color=\'navy\'" onMouseOver="this.style.color=\'red\'">')
			else
				document.write('<A class="NextPrevDisabled"> ');
			document.write('weiter&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";
	}
}

-->
