/* 
  JScript Source File 

  AUTHOR: Guo Ming Wang
  DATE  : 8/20/2002
*/
 // The name of the pop-up-window. 
var popwindow

// The height of the pop-up-window (pixels)
var popwindowwidth=300

// The width of the pop-up-window (pixels)
var popwindowheight=400

// Distance to the top margin of the big window
var popwindowtop=20


var popwindowURL="popAd1.htm"

// Standstill-time (seconds)
var waitingtime=15

// Configure ths speed of the pop-up-window
var pause=30
var step=40


var popwindowleft=-popwindowwidth-50


var marginright


var pagecenter


var timer

waitingtime= waitingtime*1300

function showWindow() {
	popwindow = window.open(popwindowURL, "popwindow", "toolbar=no,width="+popwindowwidth+",height="+popwindowheight+",top="+popwindowtop+",left="+(-popwindowwidth)+"");
	if (document.all) {
		marginright = screen.width+50
	}
	if (document.layers) {
		marginright = screen.width+50
	}
	pagecenter=Math.floor(marginright/2)-Math.floor(popwindowwidth/2)
	movewindow()
}

function movewindow() {
		if (popwindowleft<=pagecenter) {
			popwindow.moveTo(popwindowleft,popwindowtop)
			popwindowleft+=step
			timer= setTimeout("movewindow()",pause)
		}
		else {
			clearTimeout(timer)
			timer= setTimeout("movewindow2()",waitingtime)
		}
}

function movewindow2() {
		if (popwindowleft<=marginright) {
			popwindow.moveTo(popwindowleft,popwindowtop)
			popwindowleft+=step
			timer= setTimeout("movewindow2()",pause)
		}
		else {
			clearTimeout(timer)
			popwindow.close()
		}
}

function ThisDate(){

var days=new Array("","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var dateObj=new Date()
var wday=days[dateObj.getDay()+1]
var lmonth=dateObj.getMonth()+1
var date=dateObj.getDate()
var year=dateObj.getFullYear()
return wday+"&nbsp;"+date+"/"+lmonth+"/"+year
}

function showDate(){
document.write(ThisDate());
}



function checkEnquiryFm(form )
{
  // see http://www.thesitewizard.com/archive/validation.shtml
  // for an explanation of this script and how to use it on your
  // own website

  // ** START **
  if (form.Bname.value == "") {
    alert( "Please enter your email address." );
    EnquiryFm.Bname.focus();
    return false ;
  }
  // ** END **
  return true ;
}

