function clock() {
	var digital = new Date();
	var hours = digital.getHours();
	var minutes = digital.getMinutes();
	var seconds = digital.getSeconds();
	var amOrPm = "AM";
	if (hours > 11) amOrPm = "PM";
	if (hours > 12) hours = hours - 12;
	if (hours == 0) hours = 12;
	if (minutes <= 9) minutes = "0" + minutes;
	if (seconds <= 9) seconds = "0" + seconds;
	dispTime = hours + ":" + minutes + ":" + seconds + " " + amOrPm;
	document.getElementById('displayTime').innerHTML = dispTime;
	setTimeout("clock()", 1000);
}

function blinkIt() {
 if (!document.all) return;
 else {
   for(i=0;i<document.all.tags('blink').length;i++){
      s=document.all.tags('blink')[i];
      s.style.visibility=(s.style.visibility=='visible')?'hidden':'visible';
   }
   setTimeout("blinkIt()", 800);
 }
}

function toggleTbody(id) {
	if (document.getElementById) {
		var tbod = document.getElementById(id);
			if (tbod && typeof tbod.className == 'string') {
				if (tbod.className == 'on') {
					tbod.className = 'off';
				} else { tbod.className = 'on';
			}
		}
	} return false;
}

function openwindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}
function AA_Open_Window(openURL,windowName,features) {
  window.open(openURL,windowName,features);
}

function AA_Status_Bar_Message(strMessage) {
  status=strMessage;
  document.AA_ReturnValue = true;
}

	/* Modified to support Opera */
function bookmarksite(title,url){
		if (window.sidebar) // firefox
		 window.sidebar.addPanel(title, url, "");
		else if(window.opera && window.print){ // opera
		 var elem = document.createElement('a');
		 elem.setAttribute('href',url);
		 elem.setAttribute('title',title);
		 elem.setAttribute('rel','sidebar');
		 elem.click();
		} 
		else if(document.all)// ie
		 window.external.AddFavorite(url, title);
}

function AA_Reload_Page(init) {  
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.AA_pgW=innerWidth; document.AA_pgH=innerHeight; onresize=AA_reloadPage; }}
  else if (innerWidth!=document.AA_pgW || innerHeight!=document.AA_pgH) location.reload();
}
AA_Reload_Page(true);

function AA_Close_Window() {
    window.close();
}

function AA_Confirm_Msg(msg) {
  document.MM_returnValue = confirm(msg);
}

function emptyfirstnamefield(){
if (document.mailing.first.value == "First Name")
	document.mailing.first.value = "";
}

function emptylastnamefield(){
if (document.mailing.last.value == "Last Name")
	document.mailing.last.value = "";
}

function emptyemailfield(){
if (document.mailing.email.value == "E-Mail")
	document.mailing.email.value = "";
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function unblur() {
	this.blur();
} 
function blurLinks() {
	if (!document.getElementById) return;
	theLinks = document.getElementsByTagName("A");
	theAreas = document.getElementsByTagName("AREA");
	for(i=0; i<theLinks.length; i++) {theLinks[i].onfocus = unblur;}
	for(i=0; i<theAreas.length; i++) {theAreas[i].onfocus = unblur;}
}


var ns6=document.getElementById&&!document.all

function restrictinput(maxlength,e,placeholder){
	if (window.event&&event.srcElement.value.length>=maxlength)
		return false
	else if (e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength){
		var pressedkey=/[a-zA-Z0-9\.\,\/]/ //detect alphanumeric keys
		if (pressedkey.test(String.fromCharCode(e.which)))
		e.stopPropagation()
	}
}

function countlimit(maxlength,e,placeholder){
	var theform=eval(placeholder)
	var lengthleft=maxlength-theform.value.length
	var placeholderobj=document.all? document.all[placeholder] : document.getElementById(placeholder)
		if (window.event||e.target&&e.target==eval(placeholder)){
			if (lengthleft<0)
				theform.value=theform.value.substring(0,maxlength)
				placeholderobj.innerHTML=lengthleft
		}
}
function AA_Open_Window(openURL,windowName,features) {
  window.open(openURL,windowName,features);
}

function displaylimit(thename, theid, thelimit){
	var theform=theid!=""? document.getElementById(theid) : thename
	var limit_text='<b><span id="'+theform.toString()+'">'+thelimit+'</span></b> chars remaining'
	if (document.all||ns6)
		document.write(limit_text)
	if (document.all){
		eval(theform).onkeypress=function(){ return restrictinput(thelimit,event,theform)}
		eval(theform).onkeyup=function(){ countlimit(thelimit,event,theform)}
	}
	else if (ns6){
		document.body.addEventListener('keypress', function(event) { restrictinput(thelimit,event,theform) }, true); 
		document.body.addEventListener('keyup', function(event) { countlimit(thelimit,event,theform) }, true); 
	}
}


// Code to Restrict Spexial 

function initCount(ident){ // initial display setting
maxLength=150; 
  taObj=document.getElementById(ident);
 
}
function taCount(ident){
	regExInvalidChars = /[-\*\/#\=\&\^\%\$\£\"\!\`\¬\|\,\.\\;\'\[\]\{\}\:\@\<\>\?\+\.\,\/]/; //global settings
  taObj=document.getElementById(ident);
  taLength=taObj.value.length; // look at current length
  if (taLength>maxLength) { // clip characters
    taObj.value = taObj.value.substring(0,maxLength);}
  taLength=taObj.value.length; oldLength=0;
  while (oldLength<taLength) { //validate characters
    tChar=taObj.value.charAt(oldLength);
    if (regExInvalidChars.test(tChar)) {
       alert('Invalid char['+tChar+'] Only Letters, numbers or hyphens are allowed.');
       tStr = taObj.value; tail = tStr.substring(oldLength+1);
       taObj.value = tStr.substring(0,oldLength) + tail; taLength--;
       } else {oldLength++;}
  }
 
}

maxLength=150;
function inCount(identity){ // initial display setting
  taObj=document.getElementById(identity);
  
}
function tCount(identity){
 regExInvalidValue = /[\-\*\/#\=\&\^\%\$\£\"\!\`\¬\|\,\(\)\\;\'\[\]\{\}\:\@\<\>\?\_\,\/a-z]/; //global settings
  taObj=document.getElementById(identity);
  taLength=taObj.value.length; // look at current length
  if (taLength>maxLength) { // clip characters
    taObj.value = taObj.value.substring(0,maxLength);}
  taLength=taObj.value.length; oldLength=0;
  while (oldLength<taLength) { //validate characters
    tChar=taObj.value.charAt(oldLength);
    if (regExInvalidValue.test(tChar)) {
       alert('Invalid char['+tChar+'] Only Numbers are Allowed.');
       tStr = taObj.value; tail = tStr.substring(oldLength+1);
       taObj.value = tStr.substring(0,oldLength) + tail; taLength--;
       } else {oldLength++;}
  }
}


<!-- Start Tracking Code -->
var ref   = escape(document.referrer);
var land  = escape( location.href );

<!-- document.write( '<' + 'script language="javascript" src="http://www.affinityhosting.co.uk/t.php?u=2&r=' + ref + '&l=' + land + '"><' + '/script>' );
-->
<!-- End Tracking Code -->
