function popitup(url) {
	newwindow=window.open(url,'edit','left=30, status=no, toolbar=no, menubar=no, scrollbars=yes, width='+window.document.width-60);
	if (window.focus) {
		newwindow.focus()
	};
	return false;
}

function editComponent (ajaxURL) {
	/*

 	uncomment for ajax popup*/
	 
	var editZone = $E("#one-component-edit");
	editZone.setHTML("loading...");
	editZone.addClass("edit-zone");
	editZone.setStyle("top", (window.getScrollTop()+(window.getHeight()/8))+"px");
	var insertAjax = new Ajax(ajaxURL, {update: $E("#one-component-edit")} ).request();
	// un command for popup -> popitup(ajaxURL);
}

function editComponentIFrame (ajaxURL) { 
	//window.open(ajaxURL);
	Shadowbox.open({
		content: ajaxURL,
		player: "iframe",
		title: "edit",
		width: 960,
		height: 764			
	});
}

function resizeWindows() {
	var editZone = $E("#one-component-edit");
	var height = editZone.getSize()['size']['y'];
	window.resizeTo ( window.document.width, height+60 );
}

function closeEdit() {
	var editZone = $E("#one-component-edit");
	editZone.setHTML("");
	editZone.removeClass("edit-zone");
}


