 // Livingston is a master of game
// I fuck Java in the ass.
// Email me at cico@prigrevica.com

var ie4 = false; if(document.all) { ie4 = true; }
function getObject(id) { if (ie4) { return document.all[id]; } else { return document.getElementById(id); } }
function toggle(link, divId) { var lText = link.innerHTML; var d = getObject(divId);
 if (lText == 'otvori') { link.innerHTML = 'zatvori'; d.style.display = 'block'; }
 else { link.innerHTML = 'otvori'; d.style.display = 'none'; } }
pomoca = false;
saprozorom = true;
basic = false;

function thelp(swtch){
        if (swtch == 1){
                basic = false;
                saprozorom = false;
                pomoca = true;
        }
        else if (swtch == 0) {
                pomoca = false;
                saprozorom = false;
                basic = true;
        }
        else if (swtch == 2) {
                pomoca = false;
                basic = false;
                saprozorom = true;
        }
}
function pomoc(){
            alert('Pomoc ? \n Za podebljan tekst koristite tagove [b]vastekst[/b] \n Za zakrivljen  tekst koristite tagove [i]vastekst[/i] \n Za unos url http:// adrese koristite [url]http://urladresa[/url] \n \n   Autor skritpte Cico Zeljko \n   Prigrevica 2006...');

}

function podebljan() {
      if (saprozorom) {
                twrite = prompt("Podebljan tekst?",'');
                if (twrite != null && twrite != ""){
                document.editor.area.value = document.editor.area.value + "[b]" + twrite + "[/b]";
                }
        }
}
function podebljan1() {
      if (saprozorom) {
                twrite = prompt("Podebljan tekst?",'');
                if (twrite != null && twrite != ""){
                document.editor.opsirnije.value = document.editor.opsirnije.value + "[b]" + twrite + "[/b]";
                }
        }
}
function zakrivljen() {
      if (saprozorom) {
                twrite = prompt("Zakrivljen tekst?",'');
                if (twrite != null && twrite != ""){
                document.editor.area.value = document.editor.area.value + "[i]" + twrite + "[/i]";
                }
        }
}
function zakrivljen1() {
      if (saprozorom) {
                twrite = prompt("Zakrivljen tekst?",'');
                if (twrite != null && twrite != ""){
                document.editor.opsirnije.value = document.editor.opsirnije.value + "[i]" + twrite + "[/i]";
                }
        }
}
function url(){
       if (saprozorom) {
                twrite = prompt("Unesite url lokaciju.",'');
                if (twrite != null && twrite != ""){
                twrite = '' + twrite + '';
                document.editor.area.value = document.editor.area.value + '[url]' + twrite + '[/url]';
                }
        }
}
function url1(){
       if (saprozorom) {
                twrite = prompt("Unesite url lokaciju.",'');
                if (twrite != null && twrite != ""){
                twrite = '' + twrite + '';
                document.editor.opsirnije.value = document.editor.opsirnije.value + '[url]' + twrite + '[/url]';
                }
        }
}
function slika(){
       if (saprozorom) {
                twrite = prompt("Unesite lokaciju slike?",'');
                if (twrite != null && twrite != ""){
                twrite = '' + twrite + '';
                document.editor.area.value = document.editor.area.value + '[img]' + twrite + '[/img]';
                }
        }
}
function slika1(){
       if (saprozorom) {
                twrite = prompt("Unesite lokaciju slike?",'');
                if (twrite != null && twrite != ""){
                twrite = '' + twrite + '';
                document.editor.opsirnije.value = document.editor.opsirnije.value + '[img]' + twrite + '[/img]';
                }
        }
}
function citat(){
        if (pomoca) {
                alert("citat.");
        }
        else {
                document.editor.area.value = document.editor.area.value + "[citat]tekstcitata[/citat]";
        }
}
function citat1(){
        if (pomoca) {
                alert("citat.");
        }
        else {
                document.editor.opsirnije.value = document.editor.opsirnije.value + "[citat]tekstcitata[/citat]";
        }
}
function kod(){
        if (pomoca) {
                alert("kod.");
        }
        else {
                document.editor.area.value = document.editor.area.value + "[kod]tekstkoda[/kod]";
        }
}
function kod1(){
        if (pomoca) {
                alert("kod.");
        }
        else {
                document.editor.opsirnije.value = document.editor.opsirnije.value + "[kod]tekstkoda[/kod]";
        }
}
function smile(){
        if (pomoca) {
                alert("smile.");
        }
        else {
                document.editor.area.value = document.editor.area.value + " ;sm ";
        }
}
function smile1(){
        if (pomoca) {
                alert("smile.");
        }
        else {
                document.editor.opsirnije.value = document.editor.opsirnije.value + " ;sm ";
        }
}
function plz(){
        if (pomoca) {
                alert("plazi.");
        }
        else {
                document.editor.area.value = document.editor.area.value + " ;plz; ";
        }
}
function plz1(){
        if (pomoca) {
                alert("plazi.");
        }
        else {
                document.editor.opsirnije.value = document.editor.opsirnije.value + " ;plz; ";
        }
}
function yes(){
        if (pomoca) {
                alert("da.");
        }
        else {
                document.editor.area.value = document.editor.area.value + " ;ye;; ";
        }
}
function yes1(){
        if (pomoca) {
                alert("da.");
        }
        else {
                document.editor.opsirnije.value = document.editor.opsirnije.value + " ;ye;; ";
        }
}
function zzz(){
        if (pomoca) {
                alert("zz.");
        }
        else {
                document.editor.area.value = document.editor.area.value + " ;zev;; ";
        }
}
function zzz1(){
        if (pomoca) {
                alert("zzz.");
        }
        else {
                document.editor.opsirnije.value = document.editor.opsirnije.value + " ;zev;; ";
        }
}
function oho(){
        if (pomoca) {
                alert("0h0.");
        }
        else {
                document.editor.area.value = document.editor.area.value + " ;;ohw; ";
        }
}
function oho1(){
        if (pomoca) {
                alert("0h0.");
        }
        else {
                document.editor.opsirnije.value = document.editor.opsirnije.value + " ;;ohw; ";
        }
}
function hm(){
        if (pomoca) {
                alert("0h0.");
        }
        else {
                document.editor.area.value = document.editor.area.value + " ;hm; ";
        }
}
function hm1(){
        if (pomoca) {
                alert("0h0.");
        }
        else {
                document.editor.opsirnije.value = document.editor.opsirnije.value + " ;hm; ";
        }
}
function tug(){
        if (pomoca) {
                alert("0h0.");
        }
        else {
                document.editor.area.value = document.editor.area.value + " ;sa;; ";
        }
}
function tug1(){
        if (pomoca) {
                alert("0h0.");
        }
        else {
                document.editor.opsirnije.value = document.editor.opsirnije.value + " ;sa;; ";
        }
}
function st(){
        if (pomoca) {
                alert("0h0.");
        }
        else {
                document.editor.area.value = document.editor.area.value + " ;;s;; ";
        }
}
function st1(){
        if (pomoca) {
                alert("0h0.");
        }
        else {
                document.editor.opsirnije.value = document.editor.opsirnije.value + " ;;s;; ";
        }
}
function hom(){
        if (pomoca) {
                alert("0h0.");
        }
        else {
                document.editor.area.value = document.editor.area.value + " ;h;; ";
        }
}
function hom1(){
        if (pomoca) {
                alert("0h0.");
        }
        else {
                document.editor.opsirnije.value = document.editor.opsirnije.value + " ;h;; ";
        }
}
function oda(){
        if (pomoca) {
                alert("0h0.");
        }
        else {
                document.editor.area.value = document.editor.area.value + " ;ok; ";
        }
}
function oda1(){
        if (pomoca) {
                alert("0h0.");
        }
        else {
                document.editor.opsirnije.value = document.editor.opsirnije.value + " ;ok; ";
        }
}