
function popup(theurl,win_width) {

//function is passed the url, and the window width desired.

if (screen){

if (screen.width < 600){
	width = screen.width-50;
}
	else {
		width = win_width;
	}

heightto = screen.height-250;

toploc = (screen.height-heightto)/4; 
lefloc  = (screen.width-width)/4; 

window.open(theurl,"feature","width="+width+",height="+heightto+",top="+toploc+",left="+lefloc+",toolbar=yes,status=yes,scrollbars=yes,resizable=yes");

	}
}



function popupWithHeight(theurl,win_width,win_height) {  //quick dupe of above

//function is passed the url, and the window width desired.

if (screen){

if (screen.width < 600){
	width = screen.width-50;
}
	else {
		width = win_width;
	}

// heightto = screen.height-250;
heightto = win_height;

toploc = (screen.height-heightto)/4; 
lefloc  = (screen.width-width)/4; 

window.open(theurl,"feature","width="+width+",height="+heightto+",top="+toploc+",left="+lefloc+",toolbar=no,status=yes,scrollbars=no,resizable=yes");

	}
}
