function popup(filename)
{
	faq_window = window.open( filename, "faq_window", "left=110,top=90,width=375,height=250,resizable=1,scrollbars=1,toolbar=1,status=0,location=0,directories=0,menubar=1");
	faq_window.focus();
}

function popup(filename, width, height)
{

leftPos = (screen.width) ? (screen.width-width)/2 : 0;
topPos = (screen.height) ? (screen.height-height)/2 : 0;

	win = window.open( filename, "win", "left="+leftPos+",top="+topPos+",width="+width+",height="+height+",resizable=1,scrollbars=1,toolbar=0,status=0,location=0,directories=0,menubar=0");
	win.focus();
}

function openCenterWin(url,theWidth,theHeight){
var theTop=(screen.height/2)-(theHeight/2);
var theLeft=(screen.width/2)-(theWidth/2);
var features=
'height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+",scrollbars=yes";
theWin=window.open(url,'',features);
}

function openit(filename, winname, width, height)
{
    var theTop=(screen.height/2)-(height/2);
    var theLeft=(screen.width/2)-(width/2);

    var theWindow = window.open( filename, winname, "left="+theLeft+",top="+theTop+",width="+width+",height="+height+",resizable=1,scrollbars=1,toolbar=0,status=0,location=0,directories=0,menubar=0");
	theWindow.focus();
}

function printWindow()
{
   bV = parseInt(navigator.appVersion)
   if (bV >= 4) window.print()
}

if (window.Event)
{
	document.captureEvents(Event.MOUSEUP);
}

function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;
return false;
}

var x,y;

function checkIt(str, entity)
{
	if (window.Event)
	{
		x = e.screenX;
		y = e.screenY;
		rightMouseButton = (e.which == 3);
	}
	else
	{
		x = window.event.clientX;
		y = window.event.clientY;
		rightMouseButton = (window.event.button == 2);
	}

	if (rightMouseButton)
	{

		if(str!=undefined&&entity==0)
		{
			var parent = document.location.href;
			window.open(request.getContextPath()+"/admin/button/dynamic_manager.jsp?BUTTON_NAME="+str+"&LANG_ID=232&parent="+parent,"admin_window","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=600,height=250,screenX=200,screenY=200,top=200,left=200");

			return false;
		}

		if(str!=undefined&&entity==1)
		{
			var parent = document.location.href;
			win = window.open(request.getContextPath()+"/admin/content/dynamic_manager.jsp?NAME="+str+"&parent="+parent,"admin_window","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=no,resizable=yes,copyhistory=no,width=600,height=400,screenX=200,screenY=200,top=100,left=100");
			win.focus();

		}


		if(str!=undefined&&entity==2)
		{
			var parent = document.location.href;
			window.open(request.getContextPath()+"/admin/metadata/label.jsp?QUESTION_ID="+str+"&LANG_ID=232&parent="+parent,"admin_window","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=600,height=180,screenX=200,screenY=200,top=200,left=200");
			return false;
		}

	}
}

