<!–:he–>????? ?????? – ??? ?????? ?????? ??????<!–:–><!–:en–>Main Page<!–:–><!–:fr–>Main Page<!–:–><!–:es–>Main Page<!–:–>

)+$/gi;

texts[lang] = lang_text;

texts['he'] = texts['he'].split(moreregex);
if(!qtrans_isArray(texts['he'])) {
texts['he'] = [texts['he']];
}
if(max < texts['he'].length) max = texts['he'].length;

texts['en'] = texts['en'].split(moreregex);
if(!qtrans_isArray(texts['en'])) {
texts['en'] = [texts['en']];
}
if(max < texts['en'].length) max = texts['en'].length;

texts['fr'] = texts['fr'].split(moreregex);
if(!qtrans_isArray(texts['fr'])) {
texts['fr'] = [texts['fr']];
}
if(max < texts['fr'].length) max = texts['fr'].length;

texts['es'] = texts['es'].split(moreregex);
if(!qtrans_isArray(texts['es'])) {
texts['es'] = [texts['es']];
}
if(max < texts['es'].length) max = texts['es'].length;

for(var i=0; i if(i >= 1) {
text += ‘‘;
}

if(texts['he'][i] && texts['he'][i]!=”){
text += ”;
}

if(texts['en'][i] && texts['en'][i]!=”){
text += ”;
text += texts['en'][i];
text += ”;
}

if(texts['fr'][i] && texts['fr'][i]!=”){
text += ”;
}

if(texts['es'][i] && texts['es'][i]!=”){
text += ”;
}

}
text = text.replace(morenextpage_regex,”);
return text;
}

qtrans_use = function(lang, text) {
var result = qtrans_split(text);
return result[lang];
}

switchEditors.go = function(id, lang) {
var inst = tinyMCE.get(‘qtrans_textarea_’ + id);
var qt = document.getElementById(‘quicktags’);
var vta = document.getElementById(‘qtrans_textarea_’ + id);
var ta = document.getElementById(id);
var pdr = document.getElementById(‘editorcontainer’);

// update merged content
if(inst && ! inst.isHidden()) {
tinyMCE.triggerSave();
} else {
qtrans_save(vta.value);
}

// check if language is already active
if(lang!=’tinymce’ && lang!=’html’ && document.getElementById(‘qtrans_select_’+lang).className==’edButton active’) {
return;
}

if(lang!=’tinymce’ && lang!=’html’) {
document.getElementById(‘qtrans_select_’+qtrans_get_active_language()).className=’edButton’;
document.getElementById(‘qtrans_select_’+lang).className=’edButton active’;
}

if(lang==’html’) {
if ( ! inst || inst.isHidden() )
return false;
vta.style.height = inst.getContentAreaContainer().offsetHeight + 24 + ‘px’;
inst.hide();
qt.style.display = ‘block’;
vta.style.color = ‘#000′;
document.getElementById(‘edButtonHTML’).className = ‘active’;
document.getElementById(‘edButtonPreview’).className = ”;
setUserSetting( ‘editor’, ‘html’ );
} else if(lang==’tinymce’) {
if(inst && ! inst.isHidden())
return false;
vta.style.color = ‘#fff’;
edCloseAllTags(); // :-(
qt.style.display = ‘none’;
vta.value = this.wpautop(qtrans_use(qtrans_get_active_language(),ta.value));
if (inst) {
inst.show();
} else {
qtrans_hook_on_tinyMCE();
}
document.getElementById(‘edButtonHTML’).className = ”;
document.getElementById(‘edButtonPreview’).className = ‘active’;
setUserSetting( ‘editor’, ‘tinymce’ );
} else {
// switch content
qtrans_assign(‘qtrans_textarea_’+id,qtrans_use(lang,ta.value));
}
}

qtrans_assign = function(id, text) {
var inst = tinyMCE.get(id);
var ta = document.getElementById(id);
if(inst && ! inst.isHidden()) {
text = switchEditors.wpautop(text);
inst.execCommand(‘mceSetContent’, null, text);
} else {
ta.value = text;
}
}

qtrans_save = function(text) {
var ta = document.getElementById(‘content’);
ta.value = qtrans_integrate(qtrans_get_active_language(),text,ta.value);
return ta.value;
}

qtrans_integrate_title = function() {
var t = document.getElementById(‘title’);

t.value = qtrans_integrate(‘he’,document.getElementById(‘qtrans_title_he’).value,t.value);

t.value = qtrans_integrate(‘en’,document.getElementById(‘qtrans_title_en’).value,t.value);

t.value = qtrans_integrate(‘fr’,document.getElementById(‘qtrans_title_fr’).value,t.value);

t.value = qtrans_integrate(‘es’,document.getElementById(‘qtrans_title_es’).value,t.value);

}

qtrans_get_active_language = function() {

if(document.getElementById(‘qtrans_select_he’).className==’edButton active’)
return ‘he’;

if(document.getElementById(‘qtrans_select_en’).className==’edButton active’)
return ‘en’;

if(document.getElementById(‘qtrans_select_fr’).className==’edButton active’)
return ‘fr’;

if(document.getElementById(‘qtrans_select_es’).className==’edButton active’)
return ‘es’;

}

qtrans_hook_on_tinyMCE = function() {
tinyMCE.execCommand(‘mceAddControl’, false, ‘qtrans_textarea_content’);
var waitForTinyMCE = window.setInterval(function() {
if(tinyMCE.get(‘qtrans_textarea_content’)!=undefined) {
tinyMCE.get(‘qtrans_textarea_content’).onSaveContent.add(function(ed, o) {
qtrans_save(o.content);
});
window.clearInterval(waitForTinyMCE);
}
}, 250);
}

var td = document.getElementById(‘titlediv’);
var qtd = document.createElement(‘div’);
var h = document.createElement(‘h3′);
var l = document.createTextNode(‘Title (?????)’);
var tw = document.createElement(‘div’);
var ti = document.createElement(‘input’);
var slug = document.getElementById(‘edit-slug-box’);

ti.type = ‘text’;
ti.id = ‘qtrans_title_he’;
ti.tabIndex = ’1′;
ti.value = qtrans_use(‘he’, document.getElementById(‘title’).value);
ti.onchange = qtrans_integrate_title;
ti.className = ‘qtrans_title_input’;
h.className = ‘qtrans_title’;
tw.className = ‘qtrans_title_wrap’;

qtd.className = ‘postarea’;

h.appendChild(l);
tw.appendChild(ti);
qtd.appendChild(h);
qtd.appendChild(tw);if(slug) qtd.appendChild(slug);
td.parentNode.insertBefore(qtd,td);

var td = document.getElementById(‘titlediv’);
var qtd = document.createElement(‘div’);
var h = document.createElement(‘h3′);
var l = document.createTextNode(‘Title (English)’);
var tw = document.createElement(‘div’);
var ti = document.createElement(‘input’);
var slug = document.getElementById(‘edit-slug-box’);

ti.type = ‘text’;
ti.id = ‘qtrans_title_en’;
ti.tabIndex = ’1′;
ti.value = qtrans_use(‘en’, document.getElementById(‘title’).value);
ti.onchange = qtrans_integrate_title;
ti.className = ‘qtrans_title_input’;
h.className = ‘qtrans_title’;
tw.className = ‘qtrans_title_wrap’;

qtd.className = ‘postarea’;

h.appendChild(l);
tw.appendChild(ti);
qtd.appendChild(h);
qtd.appendChild(tw);
td.parentNode.insertBefore(qtd,td);

var td = document.getElementById(‘titlediv’);
var qtd = document.createElement(‘div’);
var h = document.createElement(‘h3′);
var l = document.createTextNode(‘Title (Francais)’);
var tw = document.createElement(‘div’);
var ti = document.createElement(‘input’);
var slug = document.getElementById(‘edit-slug-box’);

ti.type = ‘text’;
ti.id = ‘qtrans_title_fr’;
ti.tabIndex = ’1′;
ti.value = qtrans_use(‘fr’, document.getElementById(‘title’).value);
ti.onchange = qtrans_integrate_title;
ti.className = ‘qtrans_title_input’;
h.className = ‘qtrans_title’;
tw.className = ‘qtrans_title_wrap’;

qtd.className = ‘postarea’;

h.appendChild(l);
tw.appendChild(ti);
qtd.appendChild(h);
qtd.appendChild(tw);
td.parentNode.insertBefore(qtd,td);

var td = document.getElementById(‘titlediv’);
var qtd = document.createElement(‘div’);
var h = document.createElement(‘h3′);
var l = document.createTextNode(‘Title (Espanol)’);
var tw = document.createElement(‘div’);
var ti = document.createElement(‘input’);
var slug = document.getElementById(‘edit-slug-box’);

ti.type = ‘text’;
ti.id = ‘qtrans_title_es’;
ti.tabIndex = ’1′;
ti.value = qtrans_use(‘es’, document.getElementById(‘title’).value);
ti.onchange = qtrans_integrate_title;
ti.className = ‘qtrans_title_input’;
h.className = ‘qtrans_title’;
tw.className = ‘qtrans_title_wrap’;

qtd.className = ‘postarea’;

h.appendChild(l);
tw.appendChild(ti);
qtd.appendChild(h);
qtd.appendChild(tw);
td.parentNode.insertBefore(qtd,td);

var bc = document.getElementById(‘editor-toolbar’);
var mb = document.getElementById(‘media-buttons’);
var ls = document.createElement(‘a’);
var l = document.createTextNode(‘Espanol’);
ls.id = ‘qtrans_select_es’;
ls.className = ‘edButton’;
ls.onclick = function() { switchEditors.go(‘content’,'es’); };
ls.appendChild(l);
bc.insertBefore(ls,mb);

var bc = document.getElementById(‘editor-toolbar’);
var mb = document.getElementById(‘media-buttons’);
var ls = document.createElement(‘a’);
var l = document.createTextNode(‘Francais’);
ls.id = ‘qtrans_select_fr’;
ls.className = ‘edButton’;
ls.onclick = function() { switchEditors.go(‘content’,'fr’); };
ls.appendChild(l);
bc.insertBefore(ls,mb);

var bc = document.getElementById(‘editor-toolbar’);
var mb = document.getElementById(‘media-buttons’);
var ls = document.createElement(‘a’);
var l = document.createTextNode(‘English’);
ls.id = ‘qtrans_select_en’;
ls.className = ‘edButton’;
ls.onclick = function() { switchEditors.go(‘content’,'en’); };
ls.appendChild(l);
bc.insertBefore(ls,mb);

var bc = document.getElementById(‘editor-toolbar’);
var mb = document.getElementById(‘media-buttons’);
var ls = document.createElement(‘a’);
var l = document.createTextNode(‘?????’);
ls.id = ‘qtrans_select_he’;
ls.className = ‘edButton’;
ls.onclick = function() { switchEditors.go(‘content’,'he’); };
ls.appendChild(l);
bc.insertBefore(ls,mb);
document.getElementById(‘titlediv’).style.display=’none’;
}
// ]]>

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>