



document.write('<div id="loading">Please wait...</div>');


// document.write('<div id="loading">');
// document.write('<table border="0" cellspacing="3" cellpadding="3">');
// document.write('<tr>');
// // document.write('<td><img border="0" src="file:///Z:/mywebsitetool.com/en/images/loading/image2.gif" width="32" height="32"></td>');
// document.write('<td bgcolor="#ff0000" align="center"><font face="Verdana" size="3" color="#000000">&nbsp;&nbsp;Loading...&nbsp;&nbsp;</font></td>');
// document.write('</tr>');
// document.write('</table>');
// document.write('</div>');



function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {
  document.getElementById("loading").style.display="none";
});






/* Popup centered windows */
function popup(filename,winWidth,winHeight,extras,login,sid)
{
	userid = "<?= $userid ?>";

	if (login=="1" && userid=="0")
	{
	alert("You have selected a MEMBERS ONLY option.\n\nPlease either login or register for FREE to use this feature.\n\nThank you.");
	return;
	};
	if (winWidth=='') { winWidth = 500; };
	if (winHeight=='') { winHeight = 400; };
	place_x = (screen.width-winWidth)/2;
	place_y = (screen.height-winHeight)/2;
	path = filename + "?sid=" + sid + extras;
	//window.open(path,'','width=' + winWidth + ',height=' + winHeight + ',scrollbars=1,resizable=1');
	newWin = window.open(path,'','width=' + winWidth + ',height=' + winHeight + ',scrollbars=1,resizable=1');
	newWin.window.moveTo(place_x, place_y);
	newWin.window.resizeTo(winWidth, winHeight);
}


function tasklist(userid,sid, filename, secured)
{
  winWidth = 180;
	winHeight = screen.height;
	place_x = 0;
	place_y = 0;
	path = filename + "?sid=" + sid + "&toolbar=1&secured=" + secured;
	newWin = window.open(path,'todolist','width=' + winWidth + ',height=' + winHeight + ',scrollbars=1,resizable=1');
	newWin.window.moveTo(place_x, place_y);
	newWin.window.resizeTo(winWidth, winHeight);
	newWin.oldWin = top;
}


/* Select and Copy */
function copyit(theField) 
{
	theField.focus()
	theField.select()
}

/* Copy text to fields */
function copyTO(theField, text) 
{
	theField.value = text;
}

/* Change menu Image */
function changeImage(ImageName, Image) 
{
	document.images[ImageName].src = Image;
}

function printdate()
{
  var arrMonth = new Array("January","February","March","April","May","June", "July","August","September","October","November","December");
  var arrDays  = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday", "Saturday");
  var today    = new Date();
  
  var dayname  = arrDays[today.getDay()];
  var day      = today.getDate();
  if (day<10) { day = "" + day; };
  
  var month    = arrMonth[today.getMonth()];
  var year     = today.getYear();
  if (year<2000) { year=1900+year; };
  
  var Hour     = today.getHours();
  var Minute   = today.getMinutes();
  todaydate = dayname + " " + month + " " + day + ", " + year + "  ";
  document.write(todaydate);
}


