// JavaScript Document
var sHtmlContent
function edit(contentId, htmlContent){
	sHtmlContent = htmlContent;
	sRetValue = window.showModalDialog("edit.asp?contentId=" + contentId, window, 'dialogHeight:433px; dialogWidth:740px')
}

function editCategory(categoryId){
	sRetValue = window.showModalDialog("edit_category.asp?id=" + categoryId, window, 'dialogHeight:620px; dialogWidth:730px')
}

function editItem(Id){
	sRetValue = window.showModalDialog("edit_Item.asp?id=" + Id, window, 'dialogHeight:620px; dialogWidth:740px')
}

function editPost(Id){
	sRetValue = window.showModalDialog("edit_post.asp?id=" + Id, window, 'dialogHeight:560px; dialogWidth:740px')
}

function editArticle(articleId){
	sRetValue = window.showModalDialog("edit_article.asp?id=" + articleId, window, 'dialogHeight:560px; dialogWidth:740px')
}

function addItem(categoryId){
	location = "add_item.asp?category_id=" + categoryId
}

function addPost(articleId){
	location = "add_post.asp?article_id=" + articleId
}

function delItem(Id){
	location = "del_item.asp?id=" + Id
}

function delPost(Id){
	location = "del_post.asp?id=" + Id
}

function login(){
	window.showModalDialog("login.asp", window, 'dialogHeight:150px; dialogWidth:250px')
}

function logoff(){
	location = 'loggoff.asp?retUrl=' + escape(location.href);
}

function reloader(sUrl){
	if(sUrl == undefined)
		sUrl = "location.reload()";
	else
		sUrl = "location='" + sUrl + "'";
	setTimeout(sUrl, 100)
}
