<!-- headerScripts.js -->


var content='';
var boxheight=150;        // BACKGROUND BOX HEIGHT IN PIXELS.
var boxwidth=150;         // BACKGROUND BOX WIDTH IN PIXELS.
var boxcolor="#FFF6e9";   // BACKGROUND BOX COLOR.
var speed=40;             // SPEED OF SCROLL IN MILLISECONDS (1 SECOND=1000 MILLISECONDS)..
var pixelstep=1;          // PIXELS "STEPS" PER REPITITION.
var godown=false;         // TOP TO BOTTOM=TRUE , BOTTOM TO TOP=FALSE
var textLeft=2;           // position inside the box
var textTop=2;
var outer,inner,elementheight,ref,refX,refY;
var w3c=(document.getElementById)?true:false;
var ns4=(document.layers)?true:false;
var ie4=(document.all && !w3c)?true:false;
var ie5=(document.all && w3c)?true:false;
var ns6=(w3c && navigator.appName.indexOf("Netscape")>=0)?true:false;
var txt='';
var base;

var agent = navigator.userAgent.toLowerCase();
var app = navigator.appName.toLowerCase();
var agent_isMac = (agent.indexOf('mac') > -1);
var agent_isIE = (agent.indexOf("msie")>-1 && parseInt(navigator.appVersion.substring(0,1))>=4);
var agent_isMSN = false, vi = agent.indexOf('msn '), agent_isMacMSN = false;
if (vi > -1) {
agent_isMSN = agent.substring(vi+4);
agent_isMSN = parseFloat(agent_isMSN.substring(0,agent_isMSN.indexOf(";")));
agent_isMSN = (agent_isMSN != NaN && agent_isMSN >= 6)
}
H=(agent.indexOf("windows")>0 && agent.indexOf("aol")>0) ? screen.availHeight-window.screenTop-22:screen.availHeight//*AOL

var screenHeight=screen.Height;
var screenWidth=screen.width;

// ===================================================================
// Author: Matt Kruse <matt@mattkruse.com>
// WWW: http://www.mattkruse.com/
//
// NOTICE: You may use this code for any purpose, commercial or
// private, without any further permission from the author. You may
// remove this notice from your final code if you wish, however it is
// appreciated by the author if at least my web site address is kept.
//
// You may *NOT* re-distribute this code in any way except through its
// use. That means, you can include it in your product, or your web
// site, or any other form where the code is actually being used. You
// may not put the plain javascript up on your site for download or
// include it in your javascript libraries for download. 
// If you wish to share this code with others, please just point them
// to the URL instead.
// Please DO NOT link directly to my .js files from your site. Copy
// the files to your server and use them there. Thank you.
// ===================================================================


/* SOURCE FILE: AnchorPosition.js */

/* 
AnchorPosition.js
Author: Matt Kruse
Last modified: 10/11/02

DESCRIPTION: These functions find the position of an <A> tag in a document,
so other elements can be positioned relative to it.

COMPATABILITY: Netscape 4.x,6.x,Mozilla, IE 5.x,6.x on Windows. Some small
positioning errors - usually with Window positioning - occur on the 
Macintosh platform.

FUNCTIONS:
getAnchorPosition(anchorname)
  Returns an Object() having .x and .y properties of the pixel coordinates
  of the upper-left corner of the anchor. Position is relative to the PAGE.

getAnchorWindowPosition(anchorname)
  Returns an Object() having .x and .y properties of the pixel coordinates
  of the upper-left corner of the anchor, relative to the WHOLE SCREEN.

NOTES:

1) For popping up separate browser windows, use getAnchorWindowPosition. 
   Otherwise, use getAnchorPosition

2) Your anchor tag MUST contain both NAME and ID attributes which are the 
   same. For example:
   <A NAME="test" ID="test"> </A>

3) There must be at least a space between <A> </A> for IE5.5 to see the 
   anchor tag correctly. Do not do <A></A> with no space.
*/ 

// getAnchorPosition(anchorname)
//   This function returns an object having .x and .y properties which are the coordinates
//   of the named anchor, relative to the page.
function getAnchorPosition(anchorname) {
	// This function will return an Object with x and y properties
	var useWindow=false;
	var coordinates=new Object();
	var x=0,y=0;
	// Browser capability sniffing
	var use_gebi=false, use_css=false, use_layers=false;
	if (document.getElementById) { use_gebi=true; }
	else if (document.all) { use_css=true; }
	else if (document.layers) { use_layers=true; }
	// Logic to find position
 	if (use_gebi && document.all) {
		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_gebi) {
		var o=document.getElementById(anchorname);
		x=AnchorPosition_getPageOffsetLeft(o);
		y=AnchorPosition_getPageOffsetTop(o);
		}
 	else if (use_css) {
		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_layers) {
		var found=0;
		for (var i=0; i<document.anchors.length; i++) {
			if (document.anchors[i].name==anchorname) { found=1; break; }
			}
		if (found==0) {
			coordinates.x=0; coordinates.y=0; return coordinates;
			}
		x=document.anchors[i].x;
		y=document.anchors[i].y;
		}
	else {
		coordinates.x=0; coordinates.y=0; return coordinates;
		}
	coordinates.x=x;
	coordinates.y=y;
		
	return coordinates;
	}

// Functions for IE to get position of an object
function AnchorPosition_getPageOffsetLeft (el) {
	var ol=el.offsetLeft;
	while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }
	return ol;
	}
function AnchorPosition_getPageOffsetTop (el) {
	var ot=el.offsetTop;
	while((el=el.offsetParent) != null) { ot += el.offsetTop; }
	return ot;
	}

//alert('w3c='+ w3c + ', ns4='+ns4+ ', ie4='+ie4+ ',ie5='+ie5+ ',ns6='+ns6);
// Firefox is : w3c=true, s6=true
//alert(navigator.appName);
// Firefox : appame='netscape'

popup_bg = "WHITE"

popup_delta_x_0 = -200;
popup_delta_y_0 = -20;
popup_x_0 = 200;
popup_y_0 = -50;
popup_width_0 = 300;
popup_text_0 = "<P class=subtitle>Off-the-Shelf Software</p>Our systems cover a broad range of business areas such as:" +
"<UL><LI>Retail/Wholesale Sales" +
"<LI>Manufacturing" +
"<LI>Inventory/Warehouse Management" +
"<LI>Importing, Exporting and Distribution" +
"<LI>Management Reporting" +
"<LI>Accounting" +
"<LI>Payroll & HR" +
"<LI>E-commerce" +
"<LI>Web site development &amp; hosting" +
"</UL>" +
"Our range of industry-specific packages include:" +
"<UL>" +
" <LI>Mobile Phone/Cellphone Shop POS" +
" <LI>Cemetery Management" +
" <LI>Local Government Risk Management" +
" <LI>Club and Association Membership" +
" <LI>Hotel/Accomodation Management" +
" <LI>Facilities Management" +
" <LI>Building Management" +
" <LI>Online Music sales" +
" <LI>Transport" +
" <LI>CRM" +
" <LI>Small Business Accounting" +
"</UL>" +
"<small>(click this page to see further details)</small>" ;
popup_url_0 = "software.php";

popup_delta_x_1 = 200;
popup_delta_y_1 = -50;
popup_x_1 = 0;
popup_y_1 = -0;
popup_width_1 = 350;
popup_text_1 = "<P class=subtitle>Custom Software</p>We will provide you with a system to meet you exact needs, " +
"as completely, quickly and efficiently as possible, with a 100% money-back guarantee, at minimal cost to you - That is our goal ! " +
"<P>Software can be provided in various formats, such as a totally online system which either we or you serve, or an in-house system " +
"on your computers, and can be rented at a small monthly fee or fully owned up front." +
"<P>Our systems use the latest open-source technologies such as Java, JSP, JDBC, Linux, NetBeans, MySQL, WML, XML, WAP. " +
"In this way you are not locked in to continual upgrade costs on your operating system, databases, etc. " +
"<P>Thus your <b>Total Cost of Ownership</b> is lowered. " +
"<p><small>(click this page for further details)</small>";

popup_url_1 = "custom.php";


popup_delta_x_2 = 200;
popup_delta_y_2 = -100;
popup_x_2 = 0;
popup_y_2 = 0;
popup_width_2 = 300;
popup_text_2 = "<P class=subtitle>Consulting</p>" +
"If you are planning developing your own in-house system, we can provide the independance and expertise you require to ensure a successful project. " +
"Our range of services include :" +
"<UL><LI>business analysis, <LI>Project management, <LI>Software design, <LI>Programming, <LI>Testing , <LI>Outsourcing </UL> " +
"- anywhere in the world, at a very competitive price. " +
"<P>Programming services can be provided on-site or remotely for lower cost." +
"<p><small>(click this page for further details)</small>";
popup_url_2 = "consult.php";


popup_delta_x_3 = -200;
popup_delta_y_3 = -50;
popup_x_3 = 0;
popup_y_3 = 0;
popup_width_3 = 300;
popup_text_3 = "<P class=subtitle>Technology</p>" +
"We are not tied down to legacy systems - we use the very latest, proven, technologies, including VB.Net, C#.Net, WAP, WML, SMIL, XML. " +
"<P>We focus on open-systems such as Linux, Java, JSP, Perl, NetBeans, MySQL and Apache, but also have extensive experience in Progress, Ingres, Oracle, C, Cobol and other languages and databases. " +
"<P>Our wide range of business experience, covering most types of business, combined with our depth of technical expertese means we are well suited to tackle any type of software development you may require. " +
"<p><small>(click this page to see further details)</small>";
popup_url_3 = "technology.php";


function setText(num){

  base=getAnchorPosition('Outer_' + num);
  var cmd='popup_x_'+num + '=' + 'popup_delta_x_'+num +'+'+base.x
  eval(cmd);
  cmd='popup_y_'+num + '=' + 'popup_delta_y_'+num +'+'+ base.y;
  eval(cmd);
  content = eval('popup_text_'+num);
  txt='';

//if(ns4){
//  txt='<layer onmouseover=showPopup(\''+ num + '\') onmouseout=hidePopup(\'' + num + '\')  name="inner_' +num +'" ID="inner_' +num +'" width='+ eval('popup_width_'+num) +' visibility="show" left="'+eval('popup_x_'+num)+'" top="'+eval('popup_y_'+num)+'" >'+content+'</layer>';
//}else{
  txt='<div onClick="window.location.href=\''+eval('popup_url_'+num)+'\';"  onmouseover="showPopup(\''+ num + '\');" onmouseout=hidePopup(\'' + num + '\') id="inner_' +num +'" style="position:absolute; visibility:hidden; '  
        +' left:'+eval('popup_x_'+num)+'px; top:'+eval('popup_y_'+num)+'px; ' + 
         ' filter:progid:DXImageTransform.Microsoft.RandomDissolve(duration=.5); ' +     
         ' z-index:90' + num +'; overflow:hidden; cursor: pointer; cursor: hand;">'+
         "<Table class=popup border=0 cellspacing=0>"+
         "<TR class=popup><td class=popupTL width=\"24px\" height=\"24px\" ></td><td class=popupT></td><td class=popupTR></td></tr>" +
         "<TR class=popup><td valign=TOP class=popupL  width=\"24px\" height=\"24px\" ></td><td class=popupM width=" + popup_width_0 + "px>" +
         content+
         "</td><td class=popupR>&nbsp</td></tr>"+
         "<TR class=popup><td class=popupBL valign=TOP></td><td class=popupB></td><td class=popupBR></td></tr>" +
         "</table>" +
         '</div>';
//}
document.write(txt);
}

function GetLayerId(layerList,index){
    for(i=0;i<layerList.length;i++)if(layerList[i].id==index)return layerList[i];
    return null;
};


function fadeInPopup(num) {
  
  if (ns4){
    document.layers["inner_"+num].style.visibility='show';   
  }else if(ns6) {  // Use ns6 for Firefox
    document.all["inner_"+num].style.visibility='visible';
  }
  else{
    popup=document.getElementById("inner_"+num);
    popup.filters[0].apply(); 
    popup.style.visibility="visible";
    popup.style.display="block" ;
    popup.filters[0].play() ;
  }
}

function showPopup(num) {
  if (ns4) {
    document.layers[eval("inner_"+num)].visibility='show';   
  }else if(ns6) {
    document.all["inner_"+num].style.visibility='visible';
  }
  else {
    popup=document.getElementById("inner_"+num);
    popup.style.visibility="visible";
  }
}

function hidePopup(num) {
  if (ns4) {
    document.layers[eval("inner_"+num)].visibility='hide';   
  }else if(ns6) {
    document.all["inner_"+num].style.visibility='hidden';
  }
  else{
    popup=document.getElementById("inner_"+num);
    popup.style.visibility="hidden";
  }
}

function initVars() {

 screenHeight=screen.Height;
 screenWidth=screen.width;

 setText(0);
 setText(1);
 setText(2);
 setText(3);
}

function setPosn(num) {
  base=getAnchorPosition('Outer_' + num);
  var cmd='popup_x_'+num + '=' + 'popup_delta_x_'+num +'+'+base.x
  eval(cmd);
  cmd='popup_y_'+num + '=' + 'popup_delta_y_'+num +'+'+ base.y;
  eval(cmd);

  if (ns4) {
    document.layers[eval("inner_"+num)].left=eval('popup_x_'+num) ;
    document.layers[eval("inner_"+num)].top=eval('popup_y_'+num);
  }else if(ns6) {
    document.all["inner_"+num].style.left=eval('popup_x_'+num) + "px";
    document.all["inner_"+num].style.top=eval('popup_y_'+num) + "px";
   }
  else {
    var popup4=document.getElementById("inner_"+num);
    popup4.style.left=eval('popup_x_'+num) + "px";
    popup4.style.top=eval('popup_y_'+num) + "px";
  }
}

function resize() {
 screenHeight=screen.Height;
 screenWidth=screen.width;

 setPosn(0);
 setPosn(1);
 setPosn(2);
 setPosn(3);
}


