<!--//
var date;
function getstamp()	{
	date = new Date();
	return date.getTime();
}

function gettime() {
	var curDateTime = new Date()
	var curHour = curDateTime.getHours()
	var curMin = curDateTime.getMinutes()
	var curSec = curDateTime.getSeconds()
	var curAMPM = " AM"
	var curTime = ""
	if (curHour >= 12){
		curHour -= 12
		curAMPM = " PM"
	}
	if (curHour == 0) curHour = 12
	curTime = curHour + ":" + ((curMin < 10) ? "0" : "") + curMin + ":" + ((curSec < 10) ? "0" : "") + curSec + curAMPM
	return curTime;
}

var loaded_req = 0;
var new_req;
var new_foot;
var new_req = new Image;
var new_foot = new Image;
var win = null;
var stamp;
var do_cont = 1;
var toopen = null;
var PushPage = null;
var start_req = getstamp();
var time_elapsed;

function update_foot() {
    curTime = gettime();
	new_foot = new Image;
	new_foot.src = 'http://www.hoster.gr/LiveHelp/javascript.php?PHPSESSID=c067bee1f0ecb2dd441aa4a04eead76e&setinfo=1&sheight='+screen.height+'&swidth='+screen.width+'&offset='+curTime+'&ipadd=62.103.177.174&ref='+escape(document.referrer)+'';
}
setTimeout("update_foot()",1000);
function change_req() {
	loaded_req = new_req.width;
	if (loaded_req)
		requested('http://www.hoster.gr/LiveHelp/requested.php?PHPSESSID=c067bee1f0ecb2dd441aa4a04eead76e&ipadd=62.103.177.174');
}

function update_req() {
	stamp = getstamp();
	time_elapsed = stamp - start_req;
	if (time_elapsed > 1800000) {
	    do_cont = 0;
	}
	
	if (do_cont == 1) {
	   new_req = new Image;
	   new_req.src = 'http://www.hoster.gr/LiveHelp/checkrequest.php?PHPSESSID=c067bee1f0ecb2dd441aa4a04eead76e&nocache='+stamp+'&ipadd=62.103.177.174';
	   new_req.onload = change_req;
	   setTimeout("update_req()",10000);
	}
}
	
function popup(mypage,myname,w,h,scroll,res) {
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	var settings  ='height='+h+',';
		settings +='width='+w+',';
	    settings +='top='+wint+',';
	    settings +='left='+winl+',';
	    settings +='scrollbars='+scroll+',';
	    settings +='resizable='+res+',';
	win=window.open(mypage,myname,settings);
	if (parseInt(navigator.appVersion) >= 4) {
		win.window.focus();
	}
}

function startchat(mypage) {
	var winl = (screen.width-472)/2;
	var wint = (screen.height-320)/2;
	var settings = 'height=420,width=472,top='+wint+',left='+winl+',scrollbars=no,resizable=no';
	toopen=window.open(mypage,'phplivehelper',settings);
	if (parseInt(navigator.appVersion) >= 4) {
		toopen.window.focus();
	}
}

function requested(mypage) {
	var winl = (screen.width-175)/2;
	var wint = (screen.height-175)/2;
	var settings = 'height=175,width=175,top='+wint+',left='+winl+',scrollbars=no,resizable=no';
	toopen=window.open(mypage,'requested',settings);
	if (parseInt(navigator.appVersion) >= 4) {
		toopen.window.focus();
	}
}

function push(mypage,myname) {
	var winl = (screen.width-500)/2;
	var wint = (screen.height-500)/2;
	PushPage=window.open(mypage,myname,'toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=500,height=500,top='+wint+',left='+winl);
	if (parseInt(navigator.appVersion) >= 4) {
		PushPage.window.focus();
	}
}
update_req();
//-->


