
function JSNewChapter (id)
{
	var myreq = "/dialogs/new_chapter/?" ;

	myreq = myreq + "root="+ id ;

	PopUpEditChapter = window.open(myreq, "PopUpWin", "width=400, height=300, toolbar=0, menubar=0, scrollbars=0, resizable=1, location=0, status=0, left=50, top=50");
}




function JSEditChapter (id)
{
	var myreq = "/dialogs/edit_chapter/?" ;

	myreq = myreq + "root="+ id ;

	PopUpEditChapter = window.open(myreq, "PopUpWin", "width=500, height=600, toolbar=0, menubar=0, scrollbars=1, resizable=1, location=0, status=0, left=50, top=50");
}




function JSMoveChapter (id)
{
	var myreq = "/dialogs/move_chapter/?" ;

	myreq = myreq + "root="+ id ;


	PopUpEditChapter = window.open(myreq, "PopUpWin", "width=400, height=300, toolbar=0, menubar=0, scrollbars=0, resizable=1, location=0, status=0, left=50, top=50");
}



function JSDeleteChapter (id)
{
	var myreq = "/dialogs/delete_chapter/?" ;

	myreq = myreq + "root="+ id ;

	PopUpEditChapter = window.open(myreq, "PopUpWin", "width=400, height=300, toolbar=0, menubar=0, scrollbars=0, resizable=1, location=0, status=0, left=50, top=50");
}




function JSNewTheme (id)
{
	var myreq = "/dialogs/new_theme/?" ;

	myreq = myreq + "root="+ id ;


	PopUpRenameTheme = window.open(myreq, "PopUpWin", "width=500, height=450, toolbar=0, menubar=0, scrollbars=0, resizable=1, location=0, status=0, left=50, top=50");
}



function JSRenameTheme (id)
{
	var myreq = "/dialogs/edit_theme/?" ;

	myreq = myreq + "root=1019" ;
	myreq = myreq + "&theme=" + id ;

	PopUpRenameTheme = window.open(myreq, "PopUpWin", "width=400, height=300, toolbar=0, menubar=0, scrollbars=0, resizable=1, location=0, status=0, left=50, top=50");
}






function JSDeleteTheme (id)
{
	var myreq = "/dialogs/delete_theme/?" ;

	myreq = myreq + "root=1019" ;
	myreq = myreq + "&theme=" + id ;

	PopUpDeleteTheme = window.open(myreq, "PopUpWin", "width=400, height=300, toolbar=0, menubar=0, scrollbars=0, resizable=1, location=0, status=0, left=50, top=50");

}



function JSNewMessage (id,type)
{
	var myreq = "/dialogs/new_message_" + type + "/?" ;

	myreq = myreq + "root=1019" ;
	myreq = myreq + "&theme=" + id ;

	PopUpEditMessage = window.open(myreq, "PopUpWin", "width=500, height=450, toolbar=0, menubar=0, scrollbars=0, resizable=1, location=0, status=0, left=50, top=50");
}





function JSDeleteMessage (id)
{
	var myreq = "/dialogs/delete_message/?" ;

	myreq = myreq + "root=1019" ;
	myreq = myreq + "&theme=" + "778" ;
	myreq = myreq + "&message=" + id ;

	PopUpEditMessage = window.open(myreq, "PopUpWin", "width=400, height=300, toolbar=0, menubar=0, scrollbars=0, resizable=1, location=0, status=0, left=50, top=50");
}





function JSRenameMessage (id)
{
	var myreq = "/dialogs/edit_message/?" ;

	myreq = myreq + "root=1019" ;
	myreq = myreq + "&theme=" + "778" ;
	myreq = myreq + "&message=" + id ;

	PopUpEditMessage = window.open(myreq, "PopUpWin", "width=400, height=300, toolbar=0, menubar=0, scrollbars=0, resizable=1, location=0, status=0, left=50, top=50");
}
