//
// Programy wewnętrzne serwisu WWW http://www.msc.com.pl
//
// Copyright (C) 2003 MSC. All Rights Reserwed Worldwide.
//

/* *********************************************************** */
// -- zmienne globalne
	
var	myBgColor	= "#eeeeee";
var	firstLink	= "http://www.msc.com.pl";
var	nextLink1	= "index";
var	nextLink2	= ".html";
var	menuPos		= new Array( 
			"Strona główna",
			"Informacje o firmie",
			"Oferta",
			"Partnerzy",
			"Referencje",
			"Strefa download",
			"Kontakt" );
var	menuLink	= new Array(
			"http://www.msc.com.pl",
			"index1.html",
			"index2.html",
			"index3.html",
			"index4.html",
			"index51.php",
			"index6.html"
			);

var	subMenuPos	= new Array(
			"Usługi<br>informatyczne", 
			"Produkcja<br>oprogramowania",
			"Systemy sterowania<br>i nadzoru",
			"Systemy ERP, MRP,<br>MRP-II, TPP, TSP",
			"Systemy GSM,<br>GPRS, UMTS",
			"Internetowe<br>serwisy WWW",
			"Budynki<br>inteligentne",
			"Usługi doradcze<br>i konsultingowe",
			"Szkolenia<br>i kursy" );

/* *********************************************************** */
// -- funkcja onLoad

defaultStatus = 'MSC.COM.PL - profesjonalne systemy informatyczne';

function MSC_OL( pageNr,subPageNr ) {
if (pageNr==5) setFocus( subPageNo );
}


/* *********************************************************** */
// -- funkcje wewnętrzne

function setFocus( subPageNo ) {
if (subPageNo==1) document.forms["authorisation0013"].elements["name"].focus();
if (subPageNo==2) document.forms["authorisation0013"].elements["pass"].focus();
}

function CheckLogin() {
if (document.forms["authorisation0013"].elements["name"].value == "" ||
	document.forms["authorisation0013"].elements["pass"].value == "")	
	{
	alert("Proszę podać nazwę i hasło użytkownika");
	document.forms["authorisation0013"].elements["pass"].value = "";
	if (document.forms["authorisation0013"].elements["name"].value == "") {
		document.forms["authorisation0013"].elements["name"].focus();
		} else {
		document.forms["authorisation0013"].elements["pass"].focus();
		}
	}
	else
	document.forms["authorisation0013"].submit();
}

/* *********************************************************** */

function msc_topMenu( pnr,snr ) {
document.write('<TR><TD valign=bottom><IMG SRC="logo.gif" width=178 height=86 align=right style="margin-top: 10px;" ALT="MSC - INFORMATYKA"></TD></TR>');
document.write('<TR><TD height=3px> <!-- background="bg_pk.gif" --> </TD></TR>');
document.write('<TR><TD height=10px align=right valign=middle bgcolor=#cccccc><FONT class="msc_menu1">');
/*
       <a href="index1.html">&nbsp;firma&nbsp;</a>
&bull; <a href="index2.html">&nbsp;oferta&nbsp;</a>
&bull; <a href="index4.html">&nbsp;referencje&nbsp;</a>
&bull; <a href="index5.html">&nbsp;download&nbsp;</a>
&bull; <a href="index6.html">&nbsp;kontakt&nbsp;</a>&nbsp;
*/
document.write('</FONT></TD></TR>');
document.write('<TR><TD height=8px></TD></TR>');
}

/* *********************************************************** */

function msc_leftMenu( pnr,snr ) {
var i, lnk, mnu, stl, bgc;

if ((pnr==0) || ((pnr==5) && (snr>=3))) return;

document.write('<TABLE align=left width=180px cellspacing=0 cellspadding=0>');

for (i=0;i<menuPos.length;i++) {
	/* if (i==0) lnk = firstLink; else lnk = nextLink1 + i + nextLink2; */
	lnk = menuLink[i];
	if (i==pnr) bgc='\'#e0e0e0\''; else bgc='\'' + myBgColor + '\'';
	mnu = '<TR bgcolor=' + bgc + ' onmouseover="this.bgColor=\'#ffffff\';" onmouseout="this.bgColor=' + bgc + ';">';
	mnu+= '<TD class="msc_menu2" style="border-right: none;">';
	if (i==pnr) mnu+='<img src="flo.gif" border=0 width=17 height=15>'; else mnu+='<img src="fl.gif" border=0 width=17 height=15>';
	mnu+= '</TD><TD class="msc_menu2" style="border-left: none;"><a HREF="' + lnk +'">';
	mnu+= '<FONT class="msc_menu">' + menuPos[i];
	if (i==2) { if (pnr!=2) mnu+=' <IMG src="wsk-1.gif" border=0 width=10 height=11>'
			else mnu+=' <IMG src="wsk-2.gif" border=0 width=10 height=11>'; }
	mnu+= '</FONT></a></TD></TR>';
	if (i!=3) document.write( mnu );
	msc_subMenu( i,pnr,snr );
	}

document.write('<TR><TD></TD><TD height=');
if (pnr!=2) document.write('160px'); else document.write('20px');
document.write(' valign=bottom></TD></TR></TABLE>');
}

/* *********************************************************** */

function msc_subMenu( iln,pnr,snr ) {
var i, lnk, mnu, stl, bgc, sub1;

if ((pnr!=2) || (iln!=2)) return;

document.write('<TR><TD></TD><TD>');
document.write('<TABLE align=left width=100% cellspacing=0 cellspadding=0 style="margin-left:5px;">');

sub1=0;
if (snr>100) {
	sub1=snr;
	snr=(snr-200-(snr%10)) / 10;
	}

for (i=0;i<subMenuPos.length;i++) {
	lnk = nextLink1 + pnr;
	lnk = lnk + (i+1) + nextLink2;
	if (i==snr-1) bgc='\'#e0e0e0\''; else bgc='\'' + myBgColor + '\'';
	mnu = '<TR bgcolor=' + bgc + ' onmouseover="this.bgColor=\'#ffffff\';" onmouseout="this.bgColor=' + bgc + ';">';
	mnu+= '<TD class="msc_menu2" ><a HREF="' + lnk + '"><FONT class="msc_smenu">';
	mnu+= subMenuPos[i];
	mnu+= '</FONT></a></TD></TR>';
	if (i!=7) document.write( mnu );
	}

document.write('</TABLE></TR></TD>');
}

/* *********************************************************** */

function msc_footer( pnr,snr ) {
var today = new Date()
var year = today.getFullYear()
document.write('<TR><TD height=8px></TD></TR>');
document.write('<TR><TD height=10px align=left valign=middle bgcolor=#cccccc><FONT class="msc_footer">');
document.write('&nbsp;&copy; 2002-' + year + ' <a href="http://www.msc.com.pl">MSC.COM.PL</a>. ');
if (pnr==0) document.writeln('Serwis optymalizowany dla Internet Explorer w rozdzielczości 1024x768. ');
document.write('Wszelkie prawa zastrzeżone. ');
if (pnr!=0) document.write('Więcej informacji: <a href="mailto:biuro@msc.com.pl">biuro@msc.com.pl</a>');
document.write('</FONT></TD></TR>');
document.write('<TR><TD height=4px></TD></TR>');
document.write('</TABLE></CENTER>');
}

/* *********************************************************** */

function msc_part_1( pnr,snr ) {
document.write('<CENTER>');
document.write('<TABLE width=660 cellspacing=0 cellpadding=0 border=0>');
}

/* *********************************************************** */

function msc_part_2( pnr,snr ) {
document.write('<TR><TD>');
document.write('<TABLE width=100% cellspacing=0 cellpadding=0 border=0>');
if ((pnr!=0) && !((pnr==5) && (snr>=3)))
  document.write('<TR><TD width=185px style="padding-top: 0px;" valign=top>')
  else
  document.write('<TR>');
}

/* *********************************************************** */

function msc_part_3( pnr,snr ) {
var valign = 'bottom';
if (pnr!=0) document.write('</TD>');
// V-LINE ****************************************
document.write('<TD width=32px background="bg_pk.gif" style="background-position: top left; background-repeat: repeat-y;"></TD>');
// MAIN ****************************************** 
document.write('<TD background="bg_index');
document.write( pnr );
if (snr>0) document.write( snr );
if (pnr==4) valign='top';
document.write('.jpg" valign=top style="background-position: right ' + valign +'; background-repeat: no-repeat;">');
}

/* *********************************************************** */

function msc_part_4( pnr,snr ) {
if ((pnr==2) && (snr>0)) {
	document.write('<FONT class="msc_return">');
	document.write('<P><img src="wsk-3.gif" align=middle width=16 height=11> <a href="javascript:scrollTo(0,0);">powrót na początek strony</a><br>&nbsp;<br>');
	if (snr>100)
		document.write('<img src="wsk-5.gif" align=middle width=16 height=11> <a href="javascript:history.go(-1);">powrót do poprzedniej strony</a><br>&nbsp;<br>');
	document.write('<img src="wsk-4.gif" align=middle width=16 height=11> <a href="index2.html">powrót do oferty ogólnej</a><br>&nbsp;<br></P>');
	document.write('</FONT>');
	}
document.write('</TD></TR></TABLE></TD></TR>');
}

/* *********************************************************** */

function msc_warning( txt,err,msg ) {
document.write('<CENTER><TABLE width=400px height=60px class="vlog_msg"><TR><TD>');
document.write('<P style="text-align: center;"><B>' + txt + '</B><br>#error msc#' + err + '#</P>');
document.write('<P style="text-align: center;">' + msg + '</P>');
document.write('<P style="text-align: center;">W przypadku powtarzania się problemu,<br>skontaktuj się z <a href="mailto:admin@msc.com.pl">Administratorem</a>.</P>');
document.write('</TD></TR></TABLE></CENTER>');
}

/* *********************************************************** */
