// Methods for pop up new window according to size



function newWindowSize1(link, name) {

	var url = link ;
	var left = 0 ;
	var top = 0 ;
	var width = 800 ;
	var height = 600 ;
	var toolbar = 0 ;
	var location = 0 ;
	var status = 0 ;
	var scrollbars = 0 ;
	var resizable =  0 ;
	var menubar = 0 ;
	var fullscreen = 0;

	var newwindow=window.open(url, name, 'width='+width+', height='+height+', left='+left+', top='+top+', location='+location+', toolbar='+toolbar+',status='+status+',menubar='+menubar+',scrollbars=yes , resizable='+resizable+', fullscreen='+fullscreen+'');

	if (window.focus) {newwindow.focus()}
	
  
}

function newWindowSize2(link, name) {

	var url = link ;

	var left = 473.5 ; // default for screen that cant get screen  width and height
	var top = 351.5 ;  // default for screen that cant get screen  width and height
	
	//else get screen width and height
	if (screen) {
	left = (screen.width / 2) - 167 ; // divide by 2 - 1/2 of width
	top = (screen.height / 2) - 160 ; // divide by 2 - 1/2 of height
	}
	
	var width = 800 ;
	var height = 580 ;
	var toolbar = 0 ;
	var location = 0 ;
	var status = 0 ;
	var scrollbars = 0 ;
	var resizable =  0 ;
	var menubar = 0 ;
	var fullscreen = 0;

	var newwindow=window.open(url, name, 'width='+width+', height='+height+', left='+left+', top='+top+', location='+location+', toolbar='+toolbar+',status='+status+',menubar='+menubar+',scrollbars=yes , resizable='+resizable+', fullscreen='+fullscreen+'');
	if (window.focus) {newwindow.focus()}
	
  
}