/*
Extension developed by David J. Miles (www.z3roadster.net/dreamweaver)
To add more shock to your site, visit www.DHTML Shock.com
*/


//Begin dHTML Tooltip Timer
var tipTimer;
//End dHTML Tooltip Timer

<!--
function locateObject(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=locateObject(n,d.layers[i].document); return x;
}

function hideTooltip(object)
{
if (document.all)
{
	locateObject(object).style.visibility="hidden"
	locateObject(object).style.left = 1;
	locateObject(object).style.top = 1;
return false
}
else if (document.layers)
{
	locateObject(object).visibility="hide"
	locateObject(object).left = 1;
	locateObject(object).top = 1;
	return false
}
else
	return true
}


function showTooltip(obj,object,e, tipContent, backcolor, bordercolor, textcolor, displaytime)
{

	//window.clearTimeout(tipTimer)
//window.clearTimeout(tipTimer)
	var curleft = curtop = 0;



   if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
			
			
		}
		
	}
	
	
	if (document.all)
		{
			locateObject(object).style.top=document.body.scrollTop + 60
			
			locateObject(object).innerHTML='<table cellspacing="1" cellpadding="1" bgcolor= "'+backcolor+'" width="200" border="0"><tr><td class="normaltext">'+unescape(tipContent)+'</td></tr></table> '
			locateObject(object).style.left = curleft;

			/*if ((e.x + locateObject(object).clientWidth) > (document.body.clientWidth + document.body.scrollLeft))
				{	
					locateObject(object).style.left = (document.body.clientWidth + document.body.scrollLeft) - locateObject(object).clientWidth-10;
				}
			else
			{
			locateObject(object).style.left=document.body.scrollLeft+event.clientX
			}*/
		locateObject(object).style.visibility="visible"
		//tipTimer=window.setTimeout("hideTooltip('"+object+"')", displaytime);
		window.setTimeout("hideTooltip('"+object+"')", displaytime);
		}
	else if (document.layers)
		{
		locateObject(object).document.write('<table width="10" border="0" cellspacing="1" cellpadding="1"><tr bgcolor="'+bordercolor+'"><td><table width="10" border="0" cellspacing="0" cellpadding="2"><tr bgcolor="'+backcolor+'"><td><font style="font-family: Arial; font-size: 11px; color: '+textcolor+'">'+unescape(tipContent)+'</font></td></tr></table><td></tr></table>')
		locateObject(object).document.close()
		locateObject(object).top=e.y+20
		locateObject(object).left=curleft;
		/*if ((e.x + locateObject(object).clip.width) > (window.pageXOffset + window.innerWidth))
			{
				locateObject(object).left = window.innerWidth - locateObject(object).clip.width-10;
			}
		else
			{
			locateObject(object).left=e.x;
			}*/
		locateObject(object).visibility="show"
		//tipTimer=window.setTimeout("hideTooltip('"+object+"')", displaytime);
		window.setTimeout("hideTooltip('"+object+"')", displaytime);
	}
	else
	{
		//alert('test')
		var ie=document.all
		var ns6=document.getElementById && !document.all
		var enabletip=false
		if (ie||ns6)
		var tipobj=document.all? document.all["dHTMLToolTip"] : document.getElementById? document.getElementById("dHTMLToolTip") : ""

		if (typeof backcolor!="undefined" && backcolor!="")
		 tipobj.style.backgroundColor=backcolor
		var content 
		
		tipobj.innerHTML='<table cellspacing="1" cellpadding="1" bgcolor= "'+backcolor+'" width="200" border="0"><tr><td class="normaltext">'+unescape(tipContent)+'</td></tr></table>'
		tipobj.style.top= document.body.scrollTop + 60
		tipobj.style.left = curleft
	        enabletip=true
		
		return true
	}



}



<!-- Begin DATE VALIDATION


function checkdate(objName) {
var datefield = objName;
if (chkdate(objName) == false) {
datefield.select();
alert("That date is invalid.  Please try again.");
datefield.focus();
return false;
}
else {
return true;
   }
}


function chkdate(objName) {
var strDatestyle = "US"; //United States date style
//var strDatestyle = "EU";  //European date style
var strDate;
var strDateArray;
var strDay;
var strMonth;
var strYear;
var intday;
var intMonth;
var intYear;
var booFound = false;
var datefield = objName;
var strSeparatorArray = new Array("-"," ","/",".");
var intElementNr;
var err = 0;
var strMonthArray = new Array(12);
strMonthArray[0] = "Jan";
strMonthArray[1] = "Feb";
strMonthArray[2] = "Mar";
strMonthArray[3] = "Apr";
strMonthArray[4] = "May";
strMonthArray[5] = "Jun";
strMonthArray[6] = "Jul";
strMonthArray[7] = "Aug";
strMonthArray[8] = "Sep";
strMonthArray[9] = "Oct";
strMonthArray[10] = "Nov";
strMonthArray[11] = "Dec";
strDate = datefield.value;
if (strDate.length < 1) {
return true;
}
for (intElementNr = 0; intElementNr < strSeparatorArray.length; intElementNr++) {
if (strDate.indexOf(strSeparatorArray[intElementNr]) != -1) {
strDateArray = strDate.split(strSeparatorArray[intElementNr]);
if (strDateArray.length != 3) {
err = 1;
return false;
}
else {
strDay = strDateArray[0];
strMonth = strDateArray[1];
strYear = strDateArray[2];
}
booFound = true;
   }
}
if (booFound == false) {
if (strDate.length>5) {
strDay = strDate.substr(0, 2);
strMonth = strDate.substr(2, 2);
strYear = strDate.substr(4);
   }
}
if (strYear.length == 2) {
strYear = '20' + strYear;
}
// US style
if (strDatestyle == "US") {
strTemp = strDay;
strDay = strMonth;
strMonth = strTemp;
}
intday = parseInt(strDay, 10);
if (isNaN(intday)) {
err = 2;
return false;
}
intMonth = parseInt(strMonth, 10);
if (isNaN(intMonth)) {
for (i = 0;i<12;i++) {
if (strMonth.toUpperCase() == strMonthArray.toUpperCase()) {
intMonth = i+1;
strMonth = strMonthArray;
i = 12;
   }
}
if (isNaN(intMonth)) {
err = 3;
return false;
   }
}
intYear = parseInt(strYear, 10);
if (isNaN(intYear)) {
err = 4;
return false;
}
if (intMonth>12 || intMonth<1) {
err = 5;
return false;
}
if ((intMonth == 1 || intMonth == 3 || intMonth == 5 || intMonth == 7 || intMonth == 8 || intMonth == 10 || intMonth == 12) && (intday > 31 || intday < 1)) {
err = 6;
return false;
}
if ((intMonth == 4 || intMonth == 6 || intMonth == 9 || intMonth == 11) && (intday > 30 || intday < 1)) {
err = 7;
return false;
}
if (intMonth == 2) {
if (intday < 1) {
err = 8;
return false;
}
if (LeapYear(intYear) == true) {
if (intday > 29) {
err = 9;
return false;
}
}
else {
if (intday > 28) {
err = 10;
return false;
}
}
}
if (strDatestyle == "US") {
datefield.value = strMonthArray[intMonth-1] + " " + intday+" " + strYear;
}
else {
datefield.value = intday + " " + strMonthArray[intMonth-1] + " " + strYear;
}
return true;
}



function LeapYear(intYear) {
	if (intYear % 100 == 0) {
	if (intYear % 400 == 0) { return true; }
	}
	else {
	if ((intYear % 4) == 0) { return true; }
	}
	return false;
}


function doDateCheck(from, to) 
{
	if (Date.parse(from.value) <= Date.parse(to.value)) {
	alert("The dates are valid.");
	}
	else {
	if (from.value == "" || to.value == "") 
	alert("Both dates must be entered.");
	else 
	alert("To date must occur after the from date.");
   }
}




function CompareCurrDate(dt) 
{
//dt=document.getElementById("txtDt");
	CurrDt=new Date();
	
	var dt1=CurrDt.getDate();
	var mon1=CurrDt.getMonth()+1;
	var y1=CurrDt.getYear();
	if (y1<1000)	//for safari
		var yr1=2000+(y1-100);
	else yr1=y1;

	var str2= dt.value;

	var pos=str2.indexOf('/',0);
	if (pos==-1)
	{	alert ("Enter date in mm/dd/yy format");
		dt.focus();
		return false;
	}

var m1=trim(str2.substring(0,pos));
var mon2   = 0;
if(m1=="08")	mon2=8;
else {	if(m1=="09")	mon2=9;	
	else mon2=parseInt(m1);}

	pos1=str2.indexOf('/',pos+1);

var d1=trim(str2.substring(pos+1,pos1));

var dt2   = 0;
if(d1=="08")	dt2=8;
else {	if(d1=="09")	dt2=9;	
	else dt2=parseInt(d1);}


	var yr= str2.substring(pos1+1,10); 

	if (yr.length !=2 && yr.length != 4)
	{	alert("Invalid Year");
		dt.focus();
		return false;
	}

	//if (y1<1000){yr2= parseInt("20"+yr);  }
	//else
//	{	
if(yr.length<4)	{yr2= parseInt("20"+yr); }

		else	var yr2   = parseInt(yr); 	
//	}

	if (mon2>12 || mon2<1)
	{	alert("Invalid Month");
		dt.focus();
		return false;
	}
	if ((mon2==1 || mon2==3 || mon2==5 || mon2==7 || mon2==8 || mon2==10 || mon2==12)  && (dt2>31 || dt2<1))
	{	alert("Invalid Day");
		dt.focus();
		return false;
	}

	if ((mon2==4 || mon2==6 || mon2==9 || mon2==11)  && (dt2>31 || dt2<1))
	{	alert("Invalid Day");
		dt.focus();
		return false;
	}


	if (yr2%4==0 && mon2==2 && dt2>29)
	{	alert("Invalid Day");
		dt.focus();
		return false;
	}

	if (yr2%4 != 0 && mon2==2 && dt2>28)
	{	alert("Invalid Day");
		dt.focus();
		return false;
	}
	if(yr2<yr1)
	{	alert("Please Enter Future Date");
		dt.focus();
		return false;
	}
	if(mon2<mon1 && yr1>=yr2)
	{	alert("Please Enter Future Date");
		dt.focus();
		return false;
	}
	if(dt2<dt1 && mon1>=mon2 && yr1>=yr2)
	{	alert("Please Enter Future Date");
		dt.focus();
		return false;
	}
	return true;
	
}  



<!--END>
