//KOde by arkebion
var processList = new Array();
var mainProcessList = new Array();
//open window
function ow(url,g,y,s)
{
var xc = (screen.width - g) / 2;
var yc = (screen.width - y) / 2;
if(!s)s=1;else s=0;if(!g)g=320;if(!y)y=200;var w = window.open(url,"_blank","top="+yc+",left="+xc+"directories=0,location=0,menubar=0,scrollbars=1,resizeable=yes,status=0,toolbar=0,width="+g.toString()+",height="+y.toString());w.focus();
}
//advanced open window
function aow(my_url,my_settings)
{
var w = window.open(my_url,"_blank",my_settings);
w.focus()
}
//open modal
function om(url,g,y)
{
var now = new Date();
var flag = url.search(/\?/gi);
if(flag != -1)
var seperator = "&";
else
var seperator = "?";
url = url + seperator +"time="+ now.getSeconds() + now.getMinutes() + now.getHours();
if(!g)g=320;if(!y)y=200;var w = window.showModalDialog(url,window,"dialogHeight: "+y+"px; dialogWidth: "+g+"px; edge: Raised; center: Yes; resizable: Yes; status: No;Help: No;");
return w;
}
function resizeDialogToContent()
{
// resize window so there are no scrollbars visible
var dw = window.dialogWidth;
while (isNaN(dw))
{
dw = dw.substr(0,dw.length-1);
}
difw = dw - this.document.body.clientWidth;
window.dialogWidth = this.document.body.scrollWidth+difw+'px';
var dh = window.dialogHeight;
while (isNaN(dh))
{
dh = dh.substr(0,dh.length-1);
}
difh = dh - this.document.body.clientHeight;
window.dialogHeight = this.document.body.scrollHeight+difh+'px';
}
var minWidthFor_resizeWindowToContent=500;
function resizeWindowToContent()
{
// resize window so there are no scrollbars visible
window.resizeTo(minWidthFor_resizeWindowToContent,10);
window.resizeTo(document.body.scrollWidth+20,document.body.scrollHeight+50);
window.moveTo((window.screen.width - document.body.scrollWidth+20)/2, (window.screen.height - document.body.scrollHeight+20)/2);
}
function menuStart()
{
document.writeln("
");
}
function menuItem(title,url,hoverCSS,defaultCSS)
{
document.writeln("| "+title+" | ");
}
function cc(obj, className)
{
obj.className = className;
}
var clickedMenuItem = 0;
function naVpreloadImages() { //v3.0
var d=document; if(d.images){ if(!d.naVp) d.naVp=new Array();
var i,j=d.naVp.length,a=naVpreloadImages.arguments; for(i=0; i 10;
}
function flatSelected(cal, date) {
var el = document.getElementById("preview");
el.innerHTML = date;
}
function showFlatCalendar() {
var parent = document.getElementById("display");
// construct a calendar giving only the "selected" handler.
var cal = new Calendar(true, null, flatSelected);
// hide week numbers
cal.weekNumbers = false;
// We want some dates to be disabled; see function isDisabled above
cal.setDisabledHandler(isDisabled);
cal.setDateFormat("%A, %B %e");
// this call must be the last as it might use data initialized above; if
// we specify a parent, as opposite to the "showCalendar" function above,
// then we create a flat calendar -- not popup. Hidden, though, but...
cal.create(parent);
// ... we can show it here.
cal.show();
}
function IstNum(evnt,obj) {
var nn=obj.value
var charCode = (navigator.appName == "Netscape") ? evnt.which : evnt.keyCode
// allow minus sign at the beginning:
if (obj.value.length==0 && charCode==45) return true
// permit 1 decimal place...
// permit 2 floating point
if (nn.indexOf(".") != -1 && obj.value.length > (nn.indexOf(".")+3))
return false;
if (charCode==46 && nn.indexOf(".")==-1) return true
// ...and numbers
if (charCode == 44 && nn.indexOf(".")==-1)
{
obj.value = obj.value + ".";
return false;
}
if (charCode > 31 && (charCode < 48 || charCode > 57 )){
return false
}
return true
}
function cancelKey(evt) {
if((evt.ctrlKey && evt.keyCode == 67) || (evt.ctrlKey && evt.keyCode == 86))
evt.returnValue = true;
else
{
evt.keyCode = 0;
evt.returnValue = false;
}
}
var activeRowColor;
function listerHighlightRow(rowId,color)
{
var row = document.getElementById(rowId);
var selected = row.getAttribute('selected');
if(selected == "false")
activeRowColor = row.style.background;
else
activeRowColor = "";
var selected = row.getAttribute('selected');
if(selected == "false")
row.style.background = color;
}
function listerLowlightRow(rowId,color)
{
var row = document.getElementById(rowId);
var selected = row.getAttribute('selected');
if(selected == "false")
{
if(activeRowColor)
row.style.background = activeRowColor;
else
{
row.style.background = color;
}
}
}
function listerSelectRow(rowId,selectedColor,color)
{
var row = document.getElementById(rowId);
var selected = row.getAttribute('selected');
if(selected == "false")
{
row.setAttribute('selected','true');
row.style.background = selectedColor;
}
else
{
row.setAttribute('selected','false');
row.style.background = color;
}
}
function navigat(url)
{
location.href = url;
}
function createRequestObject() {
var ro;
var browser = navigator.appName;
if(browser == "Microsoft Internet Explorer"){
ro = new ActiveXObject("Microsoft.XMLHTTP");
}else{
ro = new XMLHttpRequest();
}
return ro;
}
var http = createRequestObject();
function checkMessages() {
http.open('get', 'messagesCheck.php');
http.onreadystatechange = handleResponse;
http.send(null);
setTimeout('checkMessages()', 60000);
}
function handleResponse() {
if(http.readyState == 4){
var response = http.responseText;
var update = new Array();
eval(response);
/*
if(response.indexOf('|' != -1)) {
update = response.split('|');
document.getElementById(update[0]).innerHTML = update[1];
}
*/
}
}