function showheaderselector(pageid){
				width=400;
				height=350;
				mcmsWindow=document.getElementById("select_header");
				if(mcmsWindow.style.display=="inline"){
					mcmsWindow.style.display="none";
				}
				else{
					mcmsWindow.style.display="inline";
				}
				
				mcmsEditor=document.getElementById("headerframe");
				mcmsEditor.src="container/select_header.php?pid="+pageid;
				
				arrayPageSize = getPageSize();
				arrayPageScroll = getPageScroll();
				
				var lightboxTop = arrayPageScroll[1] + ((arrayPageSize[3] - 35 - height) / 2);
				var lightboxLeft = ((arrayPageSize[0] - 20 - width) / 2);
				mcmsWindow.style.top = (arrayPageScroll[1] + ((arrayPageSize[3] - 35 - height) / 2) + 'px');
				mcmsWindow.style.left = (lightboxLeft < 0) ? "0px" : lightboxLeft + "px";
				
				showLightbox();
				
			}
			
			function showdeleter(articleid,pageid,width,height){
				mcmsWindow=document.getElementById("delete_text");
				if(mcmsWindow.style.display=="inline"){
					mcmsWindow.style.display="none";
				}
				else{
					mcmsWindow.style.display="inline";
				}
				mcmsEditor=document.getElementById("deleterframe");
				mcmsEditor.src="container/delete.php?articleid="+articleid+"&pid="+pageid;
				
				arrayPageSize = getPageSize();
				arrayPageScroll = getPageScroll();
				
				var lightboxTop = arrayPageScroll[1] + ((arrayPageSize[3] - 35 - height) / 2);
				var lightboxLeft = ((arrayPageSize[0] - 20 - width) / 2);
				mcmsWindow.style.top = (arrayPageScroll[1] + ((arrayPageSize[3] - 35 - height) / 2) + 'px');
				mcmsWindow.style.left = (lightboxLeft < 0) ? "0px" : lightboxLeft + "px";
				
				showLightbox();
				
			}
			
			function showtexteditor(articleid,pageid,width,height,start){
				mcmsWindow=document.getElementById("edit_text");
				if(mcmsWindow.style.display=="inline"){
					mcmsWindow.style.display="none";
				}
				else{
					mcmsWindow.style.display="inline";
					
				}
				mcmsEditor=document.getElementById("editorframe");
				mcmsEditor.src="container/texteditor.php?articleid="+articleid+"&pid="+pageid+"&start="+start;
				
				arrayPageSize = getPageSize();
				arrayPageScroll = getPageScroll();
				
				lightboxTop = arrayPageScroll[1] + ((arrayPageSize[3] - 35 - height) / 2);
				lightboxLeft = ((arrayPageSize[0] - 20 - width) / 2);
				mcmsWindow.style.top = (arrayPageScroll[1] + ((arrayPageSize[3] - 35 - height) / 2) + 'px');
				mcmsWindow.style.left = (lightboxLeft < 0) ? "0px" : lightboxLeft + "px";
				
				showLightbox();
			}
			
			function showboxeditor(articleid,pageid,width,height,start){
				mcmsWindow=document.getElementById("edit_text");
				if(mcmsWindow.style.display=="inline"){
					mcmsWindow.style.display="none";
				}
				else{
					mcmsWindow.style.display="inline";
				}
				mcmsEditor=document.getElementById("editorframe");
				mcmsEditor.src="container/boxeditor.php?articleid="+articleid+"&pid="+pageid+"&start="+start;
				
				arrayPageSize = getPageSize();
				arrayPageScroll = getPageScroll();
				
				lightboxTop = arrayPageScroll[1] + ((arrayPageSize[3] - 35 - height) / 2);
				lightboxLeft = ((arrayPageSize[0] - 20 - width) / 2);
				mcmsWindow.style.top = (arrayPageScroll[1] + ((arrayPageSize[3] - 35 - height) / 2) + 'px');
				mcmsWindow.style.left = (lightboxLeft < 0) ? "0px" : lightboxLeft + "px";
				
				showLightbox();
			}
			
			function showimageditor(articleid,pageid,width,height,imageid,category){
				mcmsWindow=document.getElementById("insert_image");
				if(mcmsWindow.style.display=="inline"){
					mcmsWindow.style.display="none";
				}
				else{
					mcmsWindow.style.display="inline";
				}
				mcmsEditor=document.getElementById("imageframe");
				mcmsEditor.src="container/imagebrowser/index.php?articleid="+articleid+"&pid="+pageid+"&imageid="+imageid+"&category="+category;
				
				arrayPageSize = getPageSize();
				arrayPageScroll = getPageScroll();
				
				lightboxTop = arrayPageScroll[1] + ((arrayPageSize[3] - 35 - height) / 2);
				lightboxLeft = ((arrayPageSize[0] - 20 - width) / 2);
				mcmsWindow.style.top = (arrayPageScroll[1] + ((arrayPageSize[3] - 35 - height) / 2) + 'px');
				mcmsWindow.style.left = (lightboxLeft < 0) ? "0px" : lightboxLeft + "px";
				
				showLightbox();
			}
			
			function showdateeditor(pageid,start){
				width=475;
				height=400;

				mcmsWindow=document.getElementById("edit_date");
				if(mcmsWindow.style.display=="inline"){
					mcmsWindow.style.display="none";
				}
				else{
					mcmsWindow.style.display="inline";
				}
				mcmsEditor=document.getElementById("dateframe");
				mcmsEditor.src="container/dateeditor.php?pid="+pageid+"&date2edit="+start;
				
				arrayPageSize = getPageSize();
				arrayPageScroll = getPageScroll();
				
				lightboxTop = arrayPageScroll[1] + ((arrayPageSize[3] - 35 - height) / 2);
				lightboxLeft = ((arrayPageSize[0] - 20 - width) / 2);
				mcmsWindow.style.top = (arrayPageScroll[1] + ((arrayPageSize[3] - 35 - height) / 2) + 'px');
				mcmsWindow.style.left = (lightboxLeft < 0) ? "0px" : lightboxLeft + "px";
				
				showLightbox();
			}
			
			function showpresseditor(pageid,start){
				width=600;
				height=650;

				mcmsWindow=document.getElementById("edit_press");
				if(mcmsWindow.style.display=="inline"){
					mcmsWindow.style.display="none";
				}
				else{
					mcmsWindow.style.display="inline";
				}
				mcmsEditor=document.getElementById("pressframe");
				mcmsEditor.src="container/presseditor.php?pid="+pageid+"&date2edit="+start;
				
				arrayPageSize = getPageSize();
				arrayPageScroll = getPageScroll();
				
				lightboxTop = arrayPageScroll[1] + ((arrayPageSize[3] - 35 - height) / 2);
				lightboxLeft = ((arrayPageSize[0] - 20 - width) / 2);
				mcmsWindow.style.top = (arrayPageScroll[1] + ((arrayPageSize[3] - 35 - height) / 2) + 'px');
				mcmsWindow.style.left = (lightboxLeft < 0) ? "0px" : lightboxLeft + "px";
				
				showLightbox();
			}
			
			function shownewseditor(pageid,start){
				width=600;
				height=650;

				mcmsWindow=document.getElementById("edit_news");
				if(mcmsWindow.style.display=="inline"){
					mcmsWindow.style.display="none";
				}
				else{
					mcmsWindow.style.display="inline";
				}
				mcmsEditor=document.getElementById("newsframe");
				mcmsEditor.src="container/newseditor.php?pid="+pageid+"&date2edit="+start;
				
				arrayPageSize = getPageSize();
				arrayPageScroll = getPageScroll();
				
				lightboxTop = arrayPageScroll[1] + ((arrayPageSize[3] - 35 - height) / 2);
				lightboxLeft = ((arrayPageSize[0] - 20 - width) / 2);
				mcmsWindow.style.top = (arrayPageScroll[1] + ((arrayPageSize[3] - 35 - height) / 2) + 'px');
				mcmsWindow.style.left = (lightboxLeft < 0) ? "0px" : lightboxLeft + "px";
				
				showLightbox();
			}
			
			
			//insert_image
			
			function save_order(){
				populateHiddenVars();
				setTimeout("document.forms['sortableListForm'].submit()",5);
			}
