function ge(a) { return document.getElementById(a); }
function showHide(d, arg) {
    var div = ge(d);
    if (arg==undefined) {
        div.style.display = div.style.display == "none"? "block" : "none"
    } else div.style.display = arg? "block" : "none";
}


function getCenter(pwidth,pheight){
	wwidth=screen.width;
	wheigth=screen.height;
	lpos= (wwidth - pwidth)/2;
	tpos= (wheigth - pheight)/2;
	return lpos, tpos;
}


function popup(src,w,h,s) {
	if(s) w=w+17;
	getCenter(w,h);
	Popwin = window.open(src,"pop_up","toolbar=0,width=" + w + ", height=" + h + ", left="+ lpos +", top="+ tpos +"; location=0, directories=0, status=1, scrollbars="+s+", menubar=0, resizable=1, copyhistory=0");
	Popwin.focus();
	//return false;
}

function inArray(obj, arr) {
	for (var i=0; i<arr.length; i++)
	{
		if (arr[i]==obj)
		{
			return true;
		}
	}
	return false;
}
