// TOGGLE LAYER ON DASHBOARD PAGE
function toggleLayer( whichLayer )
{
var elem, vis;
if( document.getElementById ) // this is the way the standards work
elem = document.getElementById( whichLayer );
else if( document.all ) // this is the way old msie versions work
elem = document.all[whichLayer];
else if( document.layers ) // this is the way nn4 works
elem = document.layers[whichLayer];
vis = elem.style;
// if the style.display value is blank we try to figure it out here
if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}
//
// FUNCTION TO HIDE THE SCREEN WHEN UPLOADING IMANGES...
function popup() {
  document.getElementById('loadingDiv').style.display='block';
  return false
}
function hide() {
  document.getElementById('loadingDiv').style.display='none';
  return false
}
// FUNCTION FOR ADDING NEW LANGUAGE STRING IN FORM
function addLanguageString(delstring)
{
var ni = document.getElementById('newStringDiv');
var numi = document.getElementById('theValue');
var num = (document.getElementById("theValue").value -1)+ 2;
numi.value = num;
var divIdName = "my"+num+"Div";
var newdiv = document.createElement('div');
newdiv.setAttribute("id",divIdName);
newdiv.innerHTML = "String <b>"+num+": </b><input name="+num+" type=\"text\" class=\"small\" id=\""+num+"\" value=\"\" size=\"45\" /> <a id=\"del_"+num+"\" href=\"javascript:;\" onclick=\"removeLanguageString(\'"+divIdName+"\')\">"+delstring+"</a>";
ni.appendChild(newdiv);
}
// REMOVE LANGUAGE STRING - ADDED AS A LINK AFTER NEW LANGUAGE STRING IS TEMPORARILY ADDED
function removeLanguageString(divNum)
{
var d = document.getElementById('newStringDiv');
var olddiv = document.getElementById(divNum);
d.removeChild(olddiv);
var numi = document.getElementById('theValue');
var num = (document.getElementById("theValue").value -1)+ 0;
numi.value = num;
}
// REMOVE USER ADDED LANGUAGE STRING FROM SAVED LIST OF STRINGS
function removeUserStrings(stringID,stringValue,remString)
{
var olddiv = document.getElementById(stringID);
var oldstring = document.getElementById(stringID).value;
var delstring = document.getElementById('deltag_'+stringID);
//
olddiv.parentNode.removeChild(olddiv);
// CHANGE LINK TO STATIC DELETED NOTICE
delstring.innerHTML = "<span class='caption'>"+stringValue+"</span><span class='deleted'> "+remString+"</span>";
//
var numi = document.getElementById('theValue');
var num = (document.getElementById("theValue").value -1)+ 0;
numi.value = num;
//
//

}