// JavaScript Document

document.write('<script type="text/javascript" src="windowfiles/dhtmlwindow.js"></script>');
document.write('<script type="text/javascript" src="modalfiles/modal.js"></script>');
document.write('<link rel="stylesheet" href="modalfiles/modal.css" type="text/css" />');
document.write('<link rel="stylesheet" href="windowfiles/dhtmlwindow.css" type="text/css" />');

var win=null;
function NewWindow(mypage,myname,w,h,scroll,resize){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable='+resize;
win = window.open(mypage,myname,settings);
if (window.focus) {win.focus()}
	return false;
}


//What happen --------------------
function AddNewHappening() {
	var agreewin=dhtmlmodal.open("happening-add", "iframe", "what-happening-add.php", ":: WHAT HAPPENING?", "width=800px,height=405px,center=1,resize=0,scrolling=0", "recal");	
		
}

function EditHappening(param) {
	var agreewin=dhtmlmodal.open("happening-edit", "iframe", "what-happening-edit.php"+param, ":: WHAT HAPPENING?", "width=800px,height=405px,center=1,resize=0,scrolling=0", "recal");			
}

//Culinary -----------------------
function AddNewCulinary() {
	var agreewin=dhtmlmodal.open("culinary-add", "iframe", "culinary-add.php", ":: PRIVATE CULINARY LESSON", "width=800px,height=405px,center=1,resize=0,scrolling=0", "recal");	
		
}

function EditCulinary(param) {
	var agreewin=dhtmlmodal.open("culinary-edit", "iframe", "culinary-edit.php"+param, ":: PRIVATE CULINARY LESSON", "width=800px,height=405px,center=1,resize=0,scrolling=0", "recal");	
		
}

//Social Scene -----------------------
function AddNewSocial() {
	var agreewin=dhtmlmodal.open("social-add", "iframe", "social-scene-add.php", ":: SOCIAL SCENE", "width=800px,height=510px,center=1,resize=0,scrolling=0", "recal");	
		
}

function EditSocial(param) {
	var agreewin=dhtmlmodal.open("social-edit", "iframe", "social-scene-edit.php"+param, ":: SOCIAL SCENE", "width=800px,height=510px,center=1,resize=0,scrolling=0", "recal");			
}

function SocialGallery(param) {
	var agreewin=dhtmlmodal.open("social-edit", "iframe", "social-scene-gallery.php"+param, ":: SOCIAL SCENE", "width=800px,height=510px,center=1,resize=0,scrolling=0", "recal");	
		
}

//Restaurant Menu -----------------------
function ManageRestaurantMenu(param) {
	var agreewin=dhtmlmodal.open("menu-list", "iframe", "menu-list.php"+param, ":: Menu", "width=800px,height=510px,center=1,resize=0,scrolling=0", "recal");			
}

//Wine Cellar > Wine List-----------------------
function ManageWineListMenu(param) {
	var agreewin=dhtmlmodal.open("wine-list", "iframe", "wine-list-name.php"+param, ":: WINE CELLAR", "width=800px,height=510px,center=1,resize=0,scrolling=0", "recal");			
}

//Wine Cellar > Wine Order -----------------------
function ManageWineOrderMenu(param) {
	var agreewin=dhtmlmodal.open("wine-list", "iframe", "wine-order-name.php"+param, ":: WINE CELLAR", "width=800px,height=510px,center=1,resize=0,scrolling=0", "recal");			
}


//Privileges -----------------------
function AddNewPrivileges() {
	var agreewin=dhtmlmodal.open("privileges-add", "iframe", "privileges-add.php", ":: PRIVILEGES", "width=550px,height=250px,center=1,resize=0,scrolling=0", "recal");	
		
}

function EditPrivileges(param) {
	var agreewin=dhtmlmodal.open("privileges-edit", "iframe", "privileges-edit.php"+param, ":: PRIVILEGES", "width=550px,height=250px,center=1,resize=0,scrolling=0", "recal");			
}

//New Member
function EditNewMeber(param) {
	var agreewin=dhtmlmodal.open("new-member-edit", "iframe", "new-member-edit.php"+param, ":: NEW MEMBER", "width=550px,height=170px,center=1,resize=0,scrolling=0", "recal");			
}
