//<!--
function Hide(id,toggle){
	if(document.getElementById(id)){
		var style;
		switch(toggle){
			case 1:
				style = 'block';
				break;
			default:
				style = 'none';
				break;
		}
		document.getElementById(id).style.display = style;
	}
}

function GoHide(id,value){
	if(value.substring(value.length-2,value.length)==':Y'){
		Hide(id,1);
	}
	else{
		Hide(id,0);
	}
}

function GoHideMatch(id,value,match){
	var arymatch = match.split(',');
	
	for (i=0; i<arymatch.length; ++i){
		if(arymatch[i]==value){
			Hide(id,1);
			return;
		}
	}
	Hide(id,0);
}

function confirmMessage(strText){

	if(window.confirm(strText)){
		return true;
	}
	else
		return false;
}

function newWindow(url, windowWidth, windowHeight, scroll, resize){

	var h = windowHeight;
	var w = windowWidth;
	var disScroll, disResize;
	
	if(scroll=='bars')
		disScroll = 'yes';
	else
		disScroll = 'no';

	if(resize=='resize')
		disResize = 'yes';
	else
		disResize = 'no';

	if(screen.width){
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	}else{winl = 0;wint =0;}
	if (winl < 0) winl = 0;
	if (wint < 0) wint = 0;
	var settings = 'height=' + h + ',';
	settings += 'width=' + w + ',';
	settings += 'top=' + wint + ',';
	settings += 'left=' + winl + ',';

	win = window.open(url , '' , settings + ', scrollbars=' + disScroll + ', menubars=no, toolbars=no, resizable=' + disResize);
	if(!win){
		alert('You appear to have a pop-up blocker that is preventing a needed page from opening. Please enable pop-ups for this page and try again');
	}
	else{
		win.window.focus();
	}
}
//-->
