function openWindow(url, wname, height, width){
	var winwidth = width;
	var winheight = height;
	var mytop = (screen.availHeight-winheight)/2-30;
	var myleft = (screen.availWidth-winwidth)/2;
	window.open(url, wname, 'left='+myleft+',scrollbars=1,resizable=1,top='+mytop+',width='+winwidth+',height='+winheight);
}



function openEditor(frm, inp){
	//window.open('editors/editor.php?type=textarea&opObj='+frm+'.'+inp, 'win_editor', 'top=10,left=10,width=800px,height=600px,help=no,status=yes,location=no,statusbar=no,menubar=no,toolbar=no,scrollbars=yes')
	window.open('editors/editor.php?type=textarea&frm='+frm+'&inp='+inp, 'win_editor', 'top=10,left=10,width=800px,height=600px,help=no,status=yes,location=no,statusbar=no,menubar=no,toolbar=no,scrollbars=yes')
	
}



var objFMInput;
var urlFM;

function openBrowser(myObj, serverPath) {

	objFMInput = myObj;
	
	urlFM = serverPath;
	var w=window.open(FileManPath + "/editors/fckeditor/editor/filemanager/browser/default/browser.html?&ServerPath="+serverPath+"&Connector=connectors/php/connector.php", "_blank", "width=800,height=600,top=0,left=0,resizable=yes");
	
}

function SetUrl(url) { 
	url = url.replace(urlFM, '');
//url=url.replace('site_images\/', '');
	objFMInput.value = url;
}


function PopupPic(sPicURL) { 
 window.open( "tmpl/popupimg.html?"+sPicURL, "",  "resizable=1,HEIGHT=200,WIDTH=200"); 
} 

