/** WNC::WebNuclearCreator - Content management system and Framework
 *  File: wnc-base.js   JS Core for WNC
 * ------------------------------------------------------------------
 *
 *  Copyright (c) 2007 - 2010 Tomas Dlouhy  http://tdsystems.okamzite.eu
 *
 *  This source file is protected by "WNC Licence Agreement"
 *  were placed in "licence.txt" or  http://tdsystems.okamzite.eu/wnclic/lic52.php
 *
 *  @copyright Copyright (c) 2007 - 2010 Tomas Dlouhy
 *  @link http://tdsystems.okamzite.eu
 *  @package wnc
 *  @version WNC::5_2
 */

function FM_SHOW_SUB_MENU (id) {
   document.getElementById(id).style.display='block';
}

function FM_HIDE_SUB_MENU (id) {
   document.getElementById(id).style.display='none';
}

function Msg() {
    window.parent.SetAutoSize( true ) ;
}

function confirmation(SRV,DEV,Name) {
	var answer = confirm("Delete entry "+Name+" ?")
	if (answer){
                window.location = SRV+"/meta/"+DEV+"/"+Name+"?action=delete";
	}
}

function confirmation_admin(LNK,Name,TXT) {
	var answer = confirm(TXT+" ["+Name+"] ?")
	if (answer){
                window.location = LNK;
	}
}

function SubmitForm(LN,QU) {
    var answer = confirm(QU);
    if (answer) {
        //alert(LN);
        window.location = LN;
    }
}


function SubDelPost(LN) {
    var answer = confirm("Delete this post?");
    if (answer) {
        //alert('xxxxx');
        window.location = LN;
    }
}

function SubDelMeta(LN,QU) {
    var answer = confirm(QU);
    if (answer) {
        window.location = LN;
    }
}


function SubDelKey(LN) {
    var answer = confirm("Delete this key?");
    if (answer) {
        window.location = LN;
    }
/*        if (LN=="") {
            window.location = "?page=admin&mod=config&opt=delete.html&id="+ID;
        } else {
            window.location = "admin/config/delete.html?id="+ID;
        }*/
    //}
}
