
var check_flag = true;

function check_all(form) {
  v = form.elements.length;
  // alert('Form length is ' +v);

  for(i=0; i < v; i++) {
     //  alert(form.elements[i].name + ' is at position ' + i);
       var name = form.elements[i].name;
       var temp = name.substring(0,5);

      if(temp == 'check') {
          // alert('its a check box ' + temp);
          if(check_flag == false) {
             // check_flag = true;
              form.elements[i].checked = false;
              ret = 'Check All';

          }
          else {
             // check_flag = false;
              form.elements[i].checked = true;
              ret = 'Uncheck All';
          }

      }


  }

  if(check_flag == false) {
      check_flag = true;
  }
  else {
      check_flag = false;
  }
  return ret;

}

function GoBack() {
  history.back();
}

function contact_form() // contact us pop-up
{
  window.open("contact_form.php","Contact","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,width=300,height=460,resizable=no");
}

function pay_by_cheque() // contact us pop-up
{
  window.open("pay_by_cheque.php","Cheque","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,width=300,height=490,resizable=yes");
}



// Popup Pages
function openWin(url, ref, width, height) {
  window.open(url, ref, "width=" + width + ",height=" + height + ",toolbar=no,location=no,menubar=yes,scrollbars=yes,resizable=yes");
}

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=yes,resizable=yes,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=yes,resizable=yes,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=#FFFFFF scroll="yes" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();
}}


/*
Live Date Script-
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions, 100's more DHTML scripts, and Terms Of Use,
visit http://www.dynamicdrive.com
*/


var dayarray=new Array("Sunday","Mon","Tue","Wed","Thur","Fri","Sat")
var montharray=new Array("Jan","Feb","Mar","April","May","June","July","Aug","Sept","Oct","Nov","Dec")

function getthedate(){
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
//daym="0"+daym
var hours=mydate.getHours()
var hour=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()

var ext="th"
if (daym==1)
ext="st"
if (daym==2)
ext="nd"
if (daym==3)
ext="rd"
if (daym==21)
ext="st"
if (daym==22)
ext="nd"
if (daym==23)
ext="rd"
if (daym==31)
ext="st"
//if (daym>3)
//ext="th"

var ts="am"
if (hour>=12)
ts="pm"
if (hour>12)
hour=hour-12
if (hour==0)
hour=12

//var dn="am"
//if (hours>=12)
//dn="pm"
//if (hours>12)
//hours=hours-12
//if (hours==0)
//hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
//change font size here
//var cdate=" &nbsp;&nbsp;&nbsp;&nbsp;"+"<b>"+dayarray[day]+", "+montharray[month]+" "+daym+ext+", "+year+"</b>"+" &nbsp;"
//var cdate=" &nbsp;&nbsp;"+dayarray[day]+", "+daym+ext+" "+montharray[month]+"<br>"+" &nbsp;&nbsp;"+hours+":"+minutes+":"+seconds+" "+dn
var cdate=dayarray[day]+" "+daym+ext+" "+montharray[month]+" - "+hour+":"+minutes+" "+ts


if (document.all)
document.all.clock.innerHTML=cdate
else
document.write(cdate)
}
if (!document.all)
getthedate()

function goforit(){
    if (document.all) {
        setInterval("getthedate()",1000)
        setFocus()
    }
}


function setFocus() {

  // forms[0] is the subscription to newsletter below menu list
  if(document.forms[1]) {
      if(document.forms[1].elements[0].type == "text") {
         // alert('type is text');
          document.forms[1].elements[0].focus()
      }

      // alert("name is "+$name);
  }


}
