﻿function PageDate() {
	var a = "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(",");
	with (new Date()) {document.write('Time: ' + (getMonth()+1) + '/' + getDate() + '/' + getFullYear() + ' ' + a[getDay()]);}
}
function PageDate1() {with (new Date()) {this.document.write(getDate() + '/' + (getMonth()+1) + '/' + getFullYear())}}

function check_user_pwd(pFrm) {
	if (pFrm.username.value.length < 3) {
		alert("User name must have 3 or more chars !");
		pFrm.username.focus();pFrm.username.select();return false;
	}
	if (pFrm.password.value.length < 3) {
		alert("Password must have 3 or more chars !");
		pFrm.password.focus();pFrm.password.select();return false;
	}
}

function check_search_value(pFrm) {
	var sTmp = "", i,
		s = pFrm.byvalue.value.toString(),
		pos = s.indexOf("%");
		
	for(i=0; i<s.length; i++) {
		if (s.charAt(i) != " ")
			sTmp += s.charAt(i);
	}
	if (pos > -1 || sTmp.length < 1) {
		alert("Search value must be at least 3 chars except space and without char \'%\' !");
		pFrm.byvalue.focus();pFrm.byvalue.select();return false;
	}
}

function show_menu(io, x, y, jo) {
	var d = document.body;
	jo.style.display = 'block';
	jo.style.pixelTop =  io.getBoundingClientRect().top + io.offsetHeight + d.scrollTop - x;
	jo.style.pixelLeft = io.getBoundingClientRect().left + d.scrollLeft - y;
}

function vOver(o) {o.style.display='block'}
function vOut(o){o.style.display='none'}

var subWin = null;
function sameWin(u, w, h) {if (subWin) subWin.close(); subWin = window.open(u, "subWin", "width="+w+", height="+h+",left="+(screen.width - w)/2+",top="+(screen.height - h)/2+",directories=no,location=0,channelmode=0,status=no,scrollbars=yes,resizable=yes,menubar=no");}
function popWin(u, w, h, sNo){if (subWin) subWin.close(); subWin = window.open(u, "subWin", "width="+w+", height="+h+",left="+(screen.width - w)/2+",top="+(screen.height - h)/2+",directories=no,location=0,channelmode=0,status=no,scrollbars="+sNo+",resizable=no,menubar=no");}

var glb_Help_Online_Call_Lable = "You could not click the dial plan in one minute again !";

