if ( document.location.protocol == 'file:' )
	alert( 'Warning: This samples does not work when loaded from local filesystem due to security restrictions implemented in Flash.'+
    		'\n\nPlease load the sample from a web server instead.') ;

	// Automatically calculates the editor base path based on the _samples directory.
	// This is usefull only for these samples. A real application should use something like this:
	// oFCKeditor.BasePath = '/fckeditor/' ;	
	// '/fckeditor/' is the default value.
	
var sBasePath = '';//document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ;
	
	// Instruct the editor to load our configurations from a custom file, leaving the
	// original configuration file untouched.

// Main Content Editor
function createCntEditor(defValue){
	var cntEditor = new FCKeditor( 'longcontent' ) ;
	cntEditor.BasePath	= sBasePath ;
	
	cntEditor.Config['CustomConfigurationsPath'] = sBasePath + 'fckconfig.js' ;
	cntEditor.Height = 400 ;
	cntEditor.Width = '100%' ;
	
	cntEditor.Value = defValue;
	cntEditor.Create() ;
}

// Short Content Editor
function createShortCntEditor(defValue){
	var cntsEditor = new FCKeditor( 'shortcontent' ) ;
	cntsEditor.BasePath	= sBasePath ;

	cntsEditor.Config['CustomConfigurationsPath'] = sBasePath + 'fckconfig.js' ;
	cntsEditor.Height = 120 ;
	cntsEditor.Width = '100%' ;
	cntsEditor.ToolbarSet = 'short' ;
	cntsEditor.Value =  defValue;
	cntsEditor.Create() ;
}

function createCntEditor2(){
	var cnt2Editor = new FCKeditor( 'long2content' ) ;
	cnt2Editor.BasePath	= sBasePath ;
	
	cnt2Editor.Config['CustomConfigurationsPath'] = sBasePath + 'fckconfig.js' ;
	cnt2Editor.Height = 400 ;
	cnt2Editor.Width = '100%' ;
	
//	cnt2Editor.Value = '<p>Start typing your text here by removing this line<\/p>' ;
	cnt2Editor.Create() ;
}

// Short Content Editor
function createShortCntEditor2(){
	var cnts2Editor = new FCKeditor( 'short2content' ) ;
	cnts2Editor.BasePath	= sBasePath ;

	cnts2Editor.Config['CustomConfigurationsPath'] = sBasePath + 'fckconfig.js' ;
	cnts2Editor.Height = 120 ;
	cnts2Editor.Width = '100%' ;
	cnts2Editor.ToolbarSet = 'short' ;
//	cnts2Editor.Value = '<p>Start typing your text here by removing this line<\/p>' ;
	cnts2Editor.Create() ;
}
/// head lines editor
function createHeadEditor(){
	var cnthEditor = new FCKeditor( 'longhcontent' ) ;
	cnthEditor.BasePath	= sBasePath ;
	
	cnthEditor.Config['CustomConfigurationsPath'] = sBasePath + 'fckconfig.js' ;
	cnthEditor.Height = 400 ;
	cnthEditor.Width = '100%' ;
	
//	cnthEditor.Value = '<p>Start typing your text here by removing this line<\/p>' ;
	cnthEditor.Create() ;
}

// Short Content Editor
function createHeadShortCntEditor(){
	var cntshEditor = new FCKeditor( 'shorthcontent' ) ;
	cntshEditor.BasePath	= sBasePath ;

	cntshEditor.Config['CustomConfigurationsPath'] = sBasePath + 'fckconfig.js' ;
	cntshEditor.Height = 120 ;
	cntshEditor.Width = '100%' ;
	cntshEditor.ToolbarSet = 'short' ;
//	cntshEditor.Value = '<p>Start typing your text here by removing this line<\/p>' ;
	cntshEditor.Create() ;
}

function createHeadEditor2(){
	var cnth2Editor = new FCKeditor( 'longh2content' ) ;
	cnth2Editor.BasePath	= sBasePath ;
	
	cnth2Editor.Config['CustomConfigurationsPath'] = sBasePath + 'fckconfig.js' ;
	cnth2Editor.Height = 400 ;
	cnth2Editor.Width = '100%' ;
	
//	cnth2Editor.Value = '<p>Start typing your text here by removing this line<\/p>' ;
	cnth2Editor.Create() ;
}

// Short Content Editor
function createHeadShortCntEditor2(){
	var cntsh2Editor = new FCKeditor( 'shorth2content' ) ;
	cntsh2Editor.BasePath	= sBasePath ;

	cntsh2Editor.Config['CustomConfigurationsPath'] = sBasePath + 'fckconfig.js' ;
	cntsh2Editor.Height = 120 ;
	cntsh2Editor.Width = '100%' ;
	cntsh2Editor.ToolbarSet = 'short' ;
//	cntsh2Editor.Value = '<p>Start typing your text here by removing this line<\/p>' ;
	cntsh2Editor.Create() ;
}

function createNewsEditor(){
	var newseditor= new FCKeditor( 'newseditor' ) ;
	newseditor.BasePath	= sBasePath ;

	newseditor.Config['CustomConfigurationsPath'] = sBasePath + 'fckconfig.js' ;
	newseditor.Height = 400 ;
	newseditor.Width = '100%' ;
//	newseditor.ToolbarSet = 'short' ;
//	newseditor.Value = '<p>Start typing your text here by removing this line<\/p>' ;
	newseditor.Create() ;
}


function createBahasAnswerEditor(){
	var BahasAnswer = new FCKeditor( 'bahasAnswer' ) ;
	BahasAnswer.BasePath	= sBasePath ;
	
	BahasAnswer.Config['CustomConfigurationsPath'] = sBasePath + 'fckconfig.js' ;
	BahasAnswer.Height = 200;
	BahasAnswer.Width = '100%' ;
	BahasAnswer.ToolbarSet = 'bahas' ;
//	BahasAnswer.Value = '<p>Start typing your text here by removing this line<\/p>' ;
	BahasAnswer.Create() ;
}

// Short Content Editor
function createBahasQuestionEditor(){
	var BahasQuestion = new FCKeditor( 'bahasQuestion' ) ;
	BahasQuestion.BasePath	= sBasePath ;
	BahasQuestion.Config['CustomConfigurationsPath'] = sBasePath + 'fckconfig.js' ;
	BahasQuestion.Height = 120 ;
	BahasQuestion.Width = '100%' ;
	BahasQuestion.ToolbarSet = 'bahas' ;
//	BahasQuestion.Value = '<p>Start typing your text here by removing this line<\/p>' ;
	BahasQuestion.Create() ;
}



function createFEditor(){
	var fEditor = new FCKeditor( 'fcontent' ) ;
	fEditor.BasePath	= sBasePath ;
	
	fEditor.Config['CustomConfigurationsPath'] = sBasePath + 'fckconfig.js' ;
	fEditor.Height = 400 ;
	fEditor.Width = '100%' ;
	
//	fEditor.Value = '<p>Start typing your text here by removing this line<\/p>' ;
	fEditor.Create() ;
}

function createLitEditor(){
	var LEditor = new FCKeditor( 'LEditor' ) ;
	LEditor.BasePath	= '/admin/' ;
	
	LEditor.Config['CustomConfigurationsPath'] = sBasePath + 'fckconfig.js' ;
	LEditor.Height = 400 ;
	LEditor.Width = '100%' ;
	LEditor.ToolbarSet = 'lit' ;
//	LEditor.Value = '<p>Start typing your text here by removing this line<\/p>' ;
	LEditor.Create() ;
}

function createLitEditorNew(defValue){
	var LEditorn = new FCKeditor( 'LEditorn' ) ;
	LEditorn.BasePath	= '/admin/' ;
	
	LEditorn.Config['CustomConfigurationsPath'] = sBasePath + 'fckconfig.js' ;
	LEditorn.Height = 400 ;
	LEditorn.Width = '100%' ;
	LEditorn.ToolbarSet = 'lit' ;
	LEditorn.Value = defValue;
	LEditorn.Create() ;
}


function disableContent(n, yes){
	var xlab = document.getElementById('slab');
	if (yes){
		xlab.innerHTML = '<span style="color: #FF0000">Content of this box will not be added! </span>';
	} else {
		xlab.innerHTML = '';
	}
}
