function openWindow(
	targetURL,
	windowName,
	top,
	left,
	width,
	height,
	withMenubar,
	withToolbar,
	withScrollbars,
	withStatusbar,
	withTitlebar,
	withHotkeys,
	isResizable,
	isAlwaysRaised,
	taskBarLocation,
	isDependent) {

  var retValue, strStyle;

  if ((withMenubar!='0') && (withMenubar!='1')) {
		withMenubar='0';
	};
	if ((withToolbar!='0') && (withToolbar!='1')) {
			withToolbar='0';
	};
	if ((withScrollbars!='0') && (withScrollbars!='1')&& (withScrollbars!='yes')&& (withScrollbars!='auto')) {
			withScrollbars='0';
	};
	if ((withStatusbar!='0') && (withStatusbar!='1')) {
			withStatusbar='0';
	};
	if ((withTitlebar!='0') && (withTitlebar!='1')) {
			withTitlebar='0';
	};
	if ((withHotkeys!='0') && (withHotkeys!='1')) {
			withHotkeys='0';
	};
	if ((isResizable!='0') && (isResizable!='1')) {
			isResizable='0';
	};
	if ((isAlwaysRaised!='0') && (isAlwaysRaised!='1')) {
			isAlwaysRaised='0';
	};
	if ((taskBarLocation!='0') && (taskBarLocation!='1')) {
			taskBarLocation='0';
	};
	if (((isDependent!='') && (isDependent!='dependent')) || (isDependent=='undefined')) {
			isDependent='dependent';
	};
  strStyle =
    'menubar=' + withMenubar +
    ',toolbar=' + withToolbar +
    ',scrollbars=' + withScrollbars +
    ',status=' + withStatusbar +
    ',width=' + width +
    ',height=' + height +
    ',top=' + top +
    ',left=' + left +
    ',titlebar=' + withTitlebar +
    ',resizable=' + isResizable +
    ',alwaysRaised=' + isAlwaysRaised +
    ',hotkeys=' + withHotkeys +
    ',location=' + taskBarLocation +
    ',\'' + isDependent + '\'';
  retValue = window.open(targetURL,windowName,strStyle);

  return retValue;
}


function SelectPage(pageid,s)
{
window.location.href = "?page="+pageid+s ;
}

function popUpScroll(targetURL, windowName, width, height,scroll) {
	var ret;
	ret=openWindow(
	targetURL,
	windowName,
	'0',
	'0',
	width,
	height,
	'0',
	'0',
	'1',
	'0',
	'0',
	'0',
	'1',
	'0',
	'0',
	'dependent');
	return false;
}

function popUp(targetURL, windowName, width, height) {
	var ret;
	ret=openWindow(
	targetURL,
	windowName,
	'0','0',width,height,
	'0',
	'0',
	'0',
	'0',
	'0',
	'0',
	'1',
	'0',
	'0',
	'dependent');
	return false;
}

function changeAll() {
	var chkBox = null;
	for (i=0; i < document.forms['mainForm'].elements.length; i++) {
		if (document.forms['mainForm'].elements[i].name.indexOf('messageChecked')!=-1) {
			document.forms['mainForm'].elements[i].checked=document.forms['mainForm'].messageCheckAll.checked;
		}
	}
}


function changeAllalt() {
	var chkBox = null;
	for (i=0; i < document.forms['mainForm'].elements.length; i++) {
		if (document.forms['mainForm'].elements[i].name.indexOf('altsulikChecked')!=-1) {
			document.forms['mainForm'].elements[i].checked=document.forms['mainForm'].altsulikCheckAll.checked;
		}
	}
}

function changeAllkozep() {
	var chkBox = null;
	for (i=0; i < document.forms['mainForm'].elements.length; i++) {
		if (document.forms['mainForm'].elements[i].name.indexOf('kozepsulikChecked')!=-1) {
			document.forms['mainForm'].elements[i].checked=document.forms['mainForm'].kozepsulikCheckAll.checked;
		}
	}
}
