Warning: Unknown: SAFE MODE Restriction in effect. The script whose uid is 10027 is not allowed to access /tmp owned by uid 0 in Unknown on line 0
var insideinform=false;
window.onload=init;
var ld="";
var allselected=new Array();
function init() {
menuinit();
// forms multiple select js style
if (allselected) {
for (nm in allselected) {
for (v in allselected[nm]) {
if (allselected[nm][v] && v)
addSelected(nm,allselected[nm][v],v);
}
}
}
var el,reg,ar;
// check for click
el=document.getElementsByClassName("click");
reg=/show_([^ ]+)/;
countclickable=1;
for(var i=0;i'+((showcode)?v:t)+'';
}
function removeSelected(htmlname,t,v) {
var textdest=wordDestObj(htmlname);
//textdest.innerHTML=textdest.innerHTML.replace(wordMarkup(htmlname,t,v),'');
removeElementById(htmlname+"_hid_"+v);
removeElementById(htmlname+"_txt_"+v);
delete allselected[htmlname][v];
}
function removeElementById(ID) {
var el=document.getElementById(ID);
el.parentNode.removeChild(el);
}
// change visibiblity - display
function toggleDisplay(ID,callerobjID) {
var obj=document.getElementById(ID);
var callerobj=document.getElementById(callerobjID);
if (!obj) alert("There seems to be missing an object called "+ID);
/* if (obj.style.display!="none") {
obj.style.display="none";
} else {
obj.style.display="block";
}*/
if (obj.className.indexOf("vanish")!=-1) {
obj.className=obj.className.replace("vanish","");
if (insideinform) {
// #e9efc0 -> #fbfaf8
toneBg(ID,new Array(233,239,192),new Array(251,250,248),10);
} else {
toneBg(ID,new Array(190,150,140),new Array(255,255,255),10);
}
callerobj.className=callerobj.className.replace("togbuttonshow","togbuttonhide");
} else {
//obj.className=obj.className.replace("updated","vanish");
obj.className+=" vanish";
callerobj.className=callerobj.className.replace("togbuttonhide","togbuttonshow");
}
}
var toneBgCount=new Array(1);
function toneBg(ID,from,to,steps,no) {
var obj=document.getElementById(ID);
if (!no) {
var no=toneBgCount.length;
toneBgCount[no]=0;
var Rnew=from[0];
var Gnew=from[1];
var Bnew=from[2];
} else {
var Rnew=calcNewCol(from[0],to[0],steps,toneBgCount[no])
var Gnew=calcNewCol(from[1],to[1],steps,toneBgCount[no])
var Bnew=calcNewCol(from[2],to[2],steps,toneBgCount[no])
}
if (toneBgCount[no]<=steps) {
obj.style.backgroundColor="rgb("+Rnew+","+Gnew+","+Bnew+")";
toneBgCount[no]++;
setTimeout("toneBg('"+ID+"',new Array("+from+"),new Array("+to+"),"+steps+","+no+")",30);
} else {
delete toneBgCount[no];
obj.style.backgroundColor="rgb("+to[0]+","+to[1]+","+to[2]+")";
}
//obj.onclick=new Function("alert('"+obj.style.backgroundColor+"')");
}
function calcNewCol(from,to,steps,currentno) {
if (to>from) {
var diff=(to-from);
var step=Math.round(diff/steps);
var newCol=(from+step*currentno);
} else {
var diff=(from-to);
var step=Math.round(diff/steps);
var newCol=(from-step*currentno);
}
return newCol;
}
// sligtly modified from inform utils, uses select ID instead
function domSelectDate(ndate,dateY,dateM,dateD) { // input from database (ndate) and selectbox names as variables
if (ndate) {
year=ndate.substring(0,4);
month=ndate.substring(5,7);
day=ndate.substring(8,10);
} else { // todays date
today = new Date()
var year=today.getYear();
if (year < 2000) year+=1900;
var month=today.getMonth()+1;
if (month<10) month="0"+month;
var day=today.getDate();
if (day<10) day="0"+day;
}
domSelectRight(dateY,year);
domSelectRight(dateM,month);
domSelectRight(dateD,day);
}
function domSelectDateTime(ndate,dateY,dateM,dateD,dateH,dateMi) { // input from database (ndate) and selectbox names as variables
domSelectDate(ndate,dateY,dateM,dateD); // date chosen here
// start with time too:
if (ndate) {
hour=ndate.substring(11,13);
minute=ndate.substring(14,16);
} else { // todays date
today = new Date()
var hour=today.getHours();
if (hour<10) hour="0"+hour;
var minute=today.getMinutes();
if (minute<10) minute="0"+minute;
}
domSelectRight(dateH,hour);
domSelectRight(dateMi,minute);
}
function domSelectRight(selectname,rvalue) {
var obj=document.getElementById(selectname);
for (o=0;o