/**
* SoftCOM Spółka jawna - http://www.softcom.wroc.pl
* @author SoftCOM Spółka jawna <biuro@softcom.wroc.pl>
* @copyright Copyright (c) 2007-2008, SoftCOM Spółka jawna
* JavaScript - zbiór funkcji
* wersja: 1.1
*/

/**
*	Obsługa menu górnego
*/
var selMg; 	//id zaznaczonej pozycji menu
function sMenu(id, sel) {
	if (id!=selMg) { 
		$(id).src='/images/'+id+'_'+sel+'.gif'; 
	}
}
function initMg() {
	if (selMg!='') { $(selMg).src='/images/'+selMg+'_on.gif'; }
}

/**
*	Obsługa menu oferta
*/
var selMo; 	//id zaznaczonej pozycji menu
function sMo(id, sel) {
	if (id!=selMo) { 
		if (sel=='on') { $(id).className='mo_pos mo_selected'; }
		else { $(id).className='mo_pos'; }
	}
}
function initMo() {
	if (selMo!='') { $(selMo).className='mo_pos mo_selected'; }
}





//funcja otwierająca okno
function aTarget(el, name, w, h)
{
 if(window.screen) {
  aw = screen.availWidth;
  ah = screen.availHeight;
 } else {
  aw = 1024;
  ah = 768;
 }
 
 settings =
        "left="+(aw-w)/2+","
        +"top="+(ah-h)/2+","
        +"screenX="+(aw-w)/2+","
        +"screenY="+(ah-h)/2+","
        +"width="+w+","
        +"height="+h+","
        +"toolbar=no,"
        +"location=no,"
        +"directories=no,"
        +"status=no,"
        +"menubar=no,"
        +"scrollbars=yes,"
        +"resizable=yes";
 var wnd = window.open(typeof el == 'string' ? el : el.getAttribute('href'), typeof name != 'undefined' ? name : '', settings);
 if (!wnd) return false;
 wnd.focus();
 return true;
}
