//old function. to be removed when new product pages are pubbed and changed to call new func.
function popModule (which) {
	var url;
	var name;
	var width;
	var height;
	var scroll;
	var resize;
	var tool;
	var menu;
	var title;

	switch (which) {
		case "musicFormats" :
			url		= "http://www.barnesandnoble.com/popup/index.asp?PID=5688";
			name	= "pop";
			width	= 583;
			height	= 400;
			scroll	= "yes";
			resize	= "no";
			tool	= "no";
			menu	= "no";
			title	= "no";
			break;
		case "musicFreeShipping" :
			url		= "http://www.barnesandnoble.com/help/ff_popup.asp";
			name	= "pop";
			width	= 583;
			height	= 400;
			scroll	= "yes";
			resize	= "no";
			tool	= "no";
			menu	= "no";
			title	= "no";
			break;			
		case "booksFreeShipping" :
			url		= "http://www.barnesandnoble.com/help/ff_popup.asp";
			name	= "pop";
			width	= 583;
			height	= 400;
			scroll	= "yes";
			resize	= "no";
			tool	= "no";
			menu	= "no";
			title	= "no";
			break;						
		case "videoAboutVHS" :
			url		= "http://www.barnesandnoble.com/popup/index.asp?PID=4430";
			name	= "pop";
			width	= 583;
			height	= 400;
			scroll	= "yes";
			resize	= "no";
			tool	= "no";
			menu	= "no";
			title	= "no";
			break;						
		case "videoAboutDVD" :
			url		= "http://www.barnesandnoble.com/popup/index.asp?PID=4429";
			name	= "pop";
			width	= 583;
			height	= 400;
			scroll	= "yes";
			resize	= "no";
			tool	= "no";
			menu	= "no";
			title	= "no";
			break;						
		case "videoFreeShipping" :
			url		= "http://www.barnesandnoble.com/help/ff_popup.asp";
			name	= "pop";
			width	= 583;
			height	= 400;
			scroll	= "yes";
			resize	= "no";
			tool	= "no";
			menu	= "no";
			title	= "no";
			break;						
		case "whenReceive" :
			url		= "http://www.barnesandnoble.com/textbooks/shipping_pop.asp";
			name	= "pop";
			width	= 583;
			height	= 400;
			scroll	= "yes";
			resize	= "no";
			tool	= "no";
			menu	= "no";
			title	= "no";
			break;						
		default :
			return(false);
		}
	return(pickPopup(url,name,width, height,scroll,resize,tool,menu,title));
	}
function pickPopup (url,name,width, height,scroll,resize,tool,menu,title) {
	window.open(url, name, 'width='+width+', height='+height+', scrollbars='+scroll+', resizable='+resize+', toolbar='+tool+', menubar='+menu+', titlebar='+title+'') 
	name.focus;
	return (true);
}


//new function that passes webhost
function popMod (which, host) {
	var url;
	var name;
	var width;
	var height;
	var scroll;
	var resize;
	var tool;
	var menu;
	var title;

	switch (which) {
		case "musicFormats" :
			url		= "http://" + host + "/popup/index.asp?PID=5688";
			name	= "pop";
			width	= 583;
			height	= 400;
			scroll	= "yes";
			resize	= "no";
			tool	= "no";
			menu	= "no";
			title	= "no";
			break;
		case "musicFreeShipping" :
			url		= "http://" + host + "/help/ff_popup.asp";
			name	= "pop";
			width	= 583;
			height	= 400;
			scroll	= "yes";
			resize	= "no";
			tool	= "no";
			menu	= "no";
			title	= "no";
			break;			
		case "booksFreeShipping" :
			url		= "http://" + host + "/help/ff_popup.asp";
			name	= "pop";
			width	= 583;
			height	= 400;
			scroll	= "yes";
			resize	= "no";
			tool	= "no";
			menu	= "no";
			title	= "no";
			break;						
		case "videoAboutVHS" :
			url		= "http://" + host + "/popup/index.asp?PID=4430";
			name	= "pop";
			width	= 583;
			height	= 400;
			scroll	= "yes";
			resize	= "no";
			tool	= "no";
			menu	= "no";
			title	= "no";
			break;						
		case "videoAboutDVD" :
			url		= "http://" + host + "/popup/index.asp?PID=4429";
			name	= "pop";
			width	= 583;
			height	= 400;
			scroll	= "yes";
			resize	= "no";
			tool	= "no";
			menu	= "no";
			title	= "no";
			break;						
		case "videoFreeShipping" :
			url		= "http://" + host + "/help/ff_popup.asp";
			name	= "pop";
			width	= 583;
			height	= 400;
			scroll	= "yes";
			resize	= "no";
			tool	= "no";
			menu	= "no";
			title	= "no";
			break;						
		case "whenReceive" :
			url		= "http://" + host + "/textbooks/shipping_pop.asp";
			name	= "pop";
			width	= 583;
			height	= 400;
			scroll	= "yes";
			resize	= "no";
			tool	= "no";
			menu	= "no";
			title	= "no";
			break;						
		case "screenViewer" :
			url		= "http://" + host + "/search/popup.asp";
			name	= "picViewer";
			width	= 480;
			height	= 500;
			scroll	= "no";
			resize	= "no";
			tool	= "no";
			menu	= "no";
			title	= "no";
			break;						
		case "popESRB" :
			url		= "http://" + host + "/ratingspopup_cds2.asp";
			name	= "picViewer";
			width	= 504;
			height	= 480;
			scroll	= "yes";
			resize	= "no";
			tool	= "no";
			menu	= "no";
			title	= "no";
			break;						
		default :
			return(false);
		}
	return(pickPopup(url,name,width, height,scroll,resize,tool,menu,title));
	}
function pickPopup (url,name,width, height,scroll,resize,tool,menu,title) {
	window.open(url, name, 'width='+width+', height='+height+', scrollbars='+scroll+', resizable='+resize+', toolbar='+tool+', menubar='+menu+', titlebar='+title+'') 
	name.focus;
	return (true);
}

