//TRADITIONAL POPUPS//////////////
function popup(url, windowName, title, width, height, titlebar, menubar, toolbar, location, scrollbars, status, resizable){
	
	
	if(!url){
		alert("Javascript Error: popup(); No URL Provided");
		return;
	}
	if(!windowName); windowName = "popup";
	
	if(!title); //ok
	if(!width) width = 780;
	if(!height) height = 560;

	if(titlebar == undefined) titlebar = true;
	if(menubar == undefined) menubar = true;
	if(toolbar == undefined) toolbar = true;
	if(location == undefined) location = true; //this is the url field
	if(scrollbars == undefined) scrollbars = true;
	if(status == undefined) status = true; //status bar at the bottom of the screen   //firefox always keeps the status bar on if you have that preference set
	
	if(resizable == undefined) resizable = true;
	
	
	var attributes =
		"width=" + width + ", " +
		"height=" + height + ", " +
		"left=" + "50" + ", " +
		"top=" + "50" + ", " +
		
		"titlebar=" + titlebar + ", " +
		"menubar=" + menubar + ", " +
		"toolbar=" + toolbar + ", " +
		"location=" + location + ", " +
		"scrollbars=" + scrollbars + ", " +
		"status=" + status + ", " + 
		"resizable=" + resizable
	;
	
	window.open(url, windowName, attributes);
	
}

function chromelessPopup(url, windowName, title, width, height, titlebar, menubar, toolbar, location, scrollbars, status, resizable){
	//alert("chromelessPopup()");
	if(titlebar == undefined) titlebar = true;
	if(menubar == undefined) menubar = false;
	if(toolbar == undefined) toolbar = false;
	if(location == undefined) location = false;
	if(scrollbars == undefined) scrollbars = false;
	if(status == undefined) status = false;
	
	if(resizable == undefined) resizable = true;
	
	popup(url, windowName, title, width, height, titlebar, menubar, toolbar, location, scrollbars, status, resizable);
	
}
/////////////////////////////






//INLINE DIV POPUPS/////////
function openInlineDivPopup(divID)
{
	//alert("openPopup() " + divID)
	var div = document.getElementById(divID);
	div.style.visibility = "visible";
	
	var div = document.getElementById("modalBgOverlay");
	div.style.visibility = "visible";
}

function closeInlineDivPopup(divID)
{
	//alert("closePopup() " + divID)
	var div = document.getElementById(divID);
	div.style.visibility = "hidden";
	
	var div = document.getElementById("modalBgOverlay");
	div.style.visibility = "hidden";
}
///////////////////////////
