
function PopUp_Window_General(url,winName, w, h) 
{ 
		win = window.open(url,winName," toolbar = 0, location = 0, directories = 0, status = 0, menubar = 0, scrollbars = 1, resizable = 1, width = " + eval(w) + ", height = "+eval(h)+",left=0,top=0"); 
}

function PopUp_Window_With_Status(url,winName, w, h) 
{ 
		win = window.open(url,winName," toolbar = 0, location = 0, directories = 0, status = 1, menubar = 0, scrollbars = 0, resizable = 0, width = " + eval(w) + ", height = "+eval(h)+", left = " + ScreenLeft(w) + ", top = " + ScreenTop(h) ); 
}
 
function PopUp_Window(url,winName, w, h, tbar, menu, havescroll, resizable, left, posTop, havestatus)   
{ 			
		win = window.open(url,winName," toolbar =" +tbar+ ", location = 0, directories = 0, status = " +havestatus+ ", menubar =" +menu+ ", scrollbars =" +havescroll+ ", resizable =" + resizable + " , width = " + eval(w) + ", height = " + eval(h) + ",top=" + posTop + ",left = " + left ); 
} 

/*function openBirtaTest(url)

{
alert("ghg");
	window.open(url,height=400,width=110,channelmode=0,dependent=0,directories=0,fullscreen=1,location=1,menubar=1,resizable=1,scrollbars=1,status=0,toolbar=1");
}*/

function openNewWindow(URLtoOpen, windowName, windowFeatures)
{
			newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}

function DoResume(mStr, url)
{	
	var x;
	x = confirm(mStr);
	if(x)
		win = window.open(url,"Link"," toolbar = 0, location = 0, directories = 0, status = 1, menubar = 0, scrollbars = 0, resizable = 0, width = 620, height = 500,left=200,top=100"); 
	else
		return false;
}

function DoResumeWH(mStr, url, w, h)
{	
	var x;
	x = confirm(mStr);
	if(x)
		win = window.open(url,"Link"," toolbar = 0, location = 0, directories = 0, status = 1, menubar = 0, scrollbars = 0, resizable = 0, width = " + eval(w) + ", height = " + eval(h) + ",left=200,top=100"); 
	else
		return false;
}

function ScreenTop(PopupHeight)
{
	var top = 0;
	if (self.screen) 
	{     
        top = (screen.height - parseFloat(PopupHeight)) / 2;
        top = top - 30; //because the popup size is the inner widow size we subtract a predefined pixel to fix the window to be centered
	}
	else
	{
		top = 10;
	}
	return top;
}

function ScreenLeft(PopupWidth)
{
	
	var left = 0;
	if (self.screen) 
	{     
        left = (screen.width - parseFloat(PopupWidth)) / 2;
	}
	else
	{
		left = 10;
	}
	return left;
}

function PopUp_Window_Advertisment(url,winName, w, h, tbar, menu, havescroll, resizable, left, posTop, havestatus)   
{	
		var win = window.open(url,winName," toolbar =" +tbar+ ", location = 0, directories = 0, status = " +havestatus+ ", menubar =" +menu+ ", scrollbars =" +havescroll+ ", resizable =" + resizable + " , width = " + eval(w) + ", height = " + eval(h) + ",top=" + posTop + ",left = " + left + ",dependent=yes,alwaysRaised=yes"); 
		win.opener = window;
		win.focus();
}


