// JavaScript Functions
function getPageHeight() {
  		var bodydoc=document.body, elem=document.documentElement.fullContainer;
  		var escrollHeight=0, eoffsetHeight=0, bscrollHeight=0, boffsetHeight=0;
  		if (elem) {
      	escrollHeight = elem.scrollHeight;
      	eoffsetHeight = elem.offsetHeight;
  		}
  		if (bodydoc) {
    		bscrollHeight = bodydoc.scrollHeight;
    		booffsetHeight = bodydoc.offsetHeight;
  		}
			var rc1=Math.max(escrollHeight,eoffsetHeight);
			var rc2=Math.max(bscrollHeight,boffsetHeight);
			var rc=Math.max(rc1,rc2)
			return rc;
	}
function getPageWidth() {
  		var bodydoc=document.body, elem=document.documentElement.container;
  		var escrollWidth=0, eoffsetWidth=0, bscrollWidth=0, boffsetWidth=0;
  		if (elem) {
      	escrollWidth = elem.scrollWidth;
      	eoffsetWidth = elem.offsetWidth;
  		}
  		if (bodydoc) {
    		bscrollWidth = bodydoc.scrollWidth;
    		booffsetWidth = bodydoc.offsetWidth;
  		}
			var rc1=Math.max(escrollWidth,eoffsetWidth);
			var rc2=Math.max(bscrollWidth,boffsetWidth);
			var rc=Math.max(rc1,rc2)
			return rc;
	}
function getScreenBrowserCode() {
	var br = navigator.appName.substring(0,9);
	var rc = screen.width;	
	if (rc < 1200 && br == "Microsoft") {
		  document.write('<link href="georgebarr.css" rel="stylesheet" type="text/css" />');
		}
		  else if (rc >= 1200 && br == "Microsoft") {
			document.write('<link href="georgebarrL.css" rel="stylesheet" type="text/css" />');	
		  }
		    else if (rc < 1200) {
			   document.write('<link href="georgebarrAlt.css" rel="stylesheet" type="text/css" />');
			}
			   else {
				  document.write('<link href="georgebarrAltL.css" rel="stylesheet" type="text/css" />');
			   }
	return;
	}
function padDown() {	    
		var sh = screen.height;
		document.write('<style type="text/css">.container {width: 96%; height:'+(sh-385)+'px; min-height:'+(sh-385)+'px;overflow: visible;text-align: center;font-size: 1em;background-color: #000066;  color: #f5f5f5;border: 0;margin-left: auto;margin-right: auto;margin-top: 0px;padding-top: 1em;padding-bottom: 0.5em;border-color: #f5f5f5;border-style: solid;background-image: url(images/bg.jpg);background-position: 0% 0%;background-repeat: repeat;border-style: solid;border-color: #ff0;border-left-width: 0.15em;border-right-width: 0.15em;border-top-width: 0px;border-bottom-width: 0.15em;}</style>');
  }
function fontSizeCh() {
  var speed = 500;
  var sw=screen.width;
    if (sw < 1024) {
		sw = 798.72}
	else
    if (sw < 1280) {
		sw = 1024; }
	else {
		sw = 1280;
	}
	var fsiz = (sw/1024);
	document.write('<style type="text/css">body {width: 100%;background-color: #00003f;color: #ff0;text-align: center;border: 0; margin: 0; padding:0; height:75%; font-size:' + fsiz+'em;font-family: arial, helvetica, sans-serif;overflow: visible;position: relative;margin-left:auto;margin-right:auto;}</style>');
/*	document.body.style.fontSize=fsiz+"em";  */
/*	timer=setTimeout("txtup()",speed); */
}
function adjustASP() {
	if (screen.height < 768) {
		document.write('<style type="text/css">.para12b {width: 44em;height: 23em;min-height: 23em;max-height: 23em;float: left;position: relative;font-size: 0.95em;text-align: center;color: #FF0;background-color: #990033;margin: 0;margin-top: 0.5em;border-width: 0.5em;border-style: groove;border-color: #FF0;outline: #FF0 solid thin;padding-left: 1.25em;padding-right: 1.25em;padding-top: 0.75em;margin-left: 15.44%;}</style>');
			}
}
function adjustDB() {
	if (screen.width < 1024) {
		var myElement = document.getElementById("para12h");
        myElement.style.width="75%";
		myElement.style.minWidth="75%";
		myElement.style.maxWidth="75%";
		myElement.style.height="25em";
		myElement.style.minHeight="25em";
		myElement.style.maxHeight="25em";
	    myElement.style.marginLeft="2.5%";
	}
}
function adjustPHP() {
	if (screen.width < 1024) {
		document.write('<style type="text/css">.para66{width: 36%;min-width: 36%;border: 0;padding: 0;margin: 0;margin-right: 9%;padding-right: 0px;padding-bottom: 0.333em;float: left;}</style>');
	}
}
function php600() {
	if (screen.width < 1024) {
		var myElement = document.getElementById("para12e");
		myElement.style.height="23em";
		myElement.style.minHeight="23em";
		myElement.style.maxHeight="23em";
		myElement.style.width="55.5%";
		myElement.style.minWidth="55.5%";
		myElement.style.marginLeft="21.5%";
		var myElement0 = document.getElementById("para70");
		myElement0.style.width="97%";
		myElement0.style.minWidth="97%";
		myElement0.style.marginLeft="3%";
		var myElement1 = document.getElementById("para66a");
		myElement1.style.width="34%";
		myElement1.style.minWidth="34%";
		myElement1.style.marginRight="2%";
		var myElement2 = document.getElementById("para66b");
		myElement2.style.width="34%";
		myElement2.style.minWidth="34%";
		myElement2.style.marginRight="2%";
		var myElement3 = document.getElementById("para66c");
		myElement3.style.width="34%";
		myElement3.style.minWidth="34%";
		myElement3.style.marginRight="2%";
		var myElement4 = document.getElementById("para66d");
		myElement4.style.width="34%";
		myElement4.style.minWidth="34%";
		myElement4.style.marginRight="2%";
		var myElement5 = document.getElementById("para66e");
		myElement5.style.width="34%";
		myElement5.style.minWidth="34%";
		myElement5.style.marginRight="2%";
	}
}
function globeSize(){
  var sw=screen.width;
  if (sw < 1280) {
		sw = 1024; }
	else {
		sw = 1280;
	}
  if (sw > 1024) {
	  document.write('<style type="text/css">.para13 {width: 10.625em;height: 17.2em;min-height: 17.2em;float: right;position: relative;font-size: 1em;color:#FF0; text-align: center;margin: 0;padding: 0;padding-top: 1em;margin-top: 1.25em;margin-right: 0.625em;border-width: 0.5em;border-style: ridge;border-color: #FF0; background-image: url(images/globe1200.jpg);background-position: 0% 0%;background-repeat: no-repeat;}</style>');
	  document.write('<style type="text/css">.para13a {width: 10.625em;height: 17.2em;min-height: 17.2em;float: right;position: relative;font-size: 1em;color:#FF0; text-align: center;margin: 0;padding: 0;padding-top: 1em;margin-top: 1.25em;margin-right: 0.625em;border-width: 0.5em;border-style: ridge;border-color: #FF0; background-image: url(images/globe1200.jpg);background-position: 0% 0%;background-repeat: no-repeat;}</style>');
  }
  else {
	  document.write('<style type="text/css">.para13 {width: 10.625em;height: 17.2em;min-height: 17.2em;float: right;position: relative;font-size: 1em;color:#FF0; text-align: center;margin: 0;padding: 0;padding-top: 1em;margin-top: 1.25em;margin-right: 0.625em;border-width: 0.5em;border-style: ridge;border-color: #FF0; background-image: url(images/globe1024.jpg);background-position: 0% 0%;background-repeat: no-repeat;}</style>');
	  document.write('<style type="text/css">.para13a {width: 10.625em;height: 17.2em;min-height: 17.2em;float: right;position: relative;font-size: 1em;color:#FF0; text-align: center;margin: 0;padding: 0;padding-top: 1em;margin-top: 1.25em;margin-right: 0.625em;border-width: 0.5em;border-style: ridge;border-color: #FF0; background-image: url(images/globe1024.jpg);background-position: 0% 0%;background-repeat: no-repeat;}</style>');
  } 
}
function correctNav() {
    var br1 = navigator.userAgent.substring(25,29);
	var br2 = navigator.userAgent.substring(30,31);
    var br3 = parseFloat(br2);
	br4 = br3-1; 
    if (br1 == 'MSIE') {
		if (br3 < 8) {
		  document.write('<style type="text/css">.dropdown {float:left; padding-right:0px; text-align: left; margin-top: 0px;}</style>');
		  document.write('<style type="text/css">.dropdown dt {border:0px; padding:0px;  cursor:pointer;}</style>');
		  document.write('<style type="text/css">.dropdown dt:hover { }</style>');
		  document.write('<style type="text/css">.dropdown dd {position:absolute; overflow:visible; display:none;background:#000099; z-index:400; margin-left: -0.01em;}</style>');
		  document.write('<style type="text/css">.dropdown ul { border:0px; list-style:none; border: 0px; margin: 0px; padding: 0px; margin-top: 0px;}</style>');
		  document.write('<style type="text/css">.dropdown li {display:inline;}</style>');
		  document.write('<style type="text/css">.dropdown a, .dropdown a:active, .dropdown a:visited {display:block; padding:0px; border: 0px; color:#ff0000; text-decoration:none; background-color:#000066; }</style>');
		  document.write('<style type="text/css">.dropdown a:hover {background-color:#ff0; color:#000099;}</style>');
		  document.write('<style type="text/css">.dropdown .underline {border-bottom:0px;}</style>');
		}
	}
}
function marLeft() {
	var br1 = navigator.userAgent.substring(25,29);
	var br2 = navigator.userAgent.substring(30,31);
    var br3 = parseFloat(br2);
	br4 = br3-1; 
    if ((br1 == 'MSIE') && (br3 < 8)) {
				document.write('<style type="text/css">.para12 {width: 52.083%; float: left;position: relative;font-size: 1em;text-align: left;color: #FF0;background-color: #990033;margin: 0;margin-top: 0.5em;border-width: 0.5em;border-style: groove;border-color: #FF0;outline: #FF0 solid thin;padding-bottom: 1.25em;padding-left: 1.25em;padding-right: 1.25em;padding-top: 1.25em;margin-left: 0px;}</style>');
	}
}
/* function marLeft1() {
	var br1 = navigator.userAgent.substring(25,29);
	var br2 = navigator.userAgent.substring(30,31);
    var br3 = parseFloat(br2);
	br4 = br3-1; 
    if ((br1 == 'MSIE') && (br3 < 8)) {
	   var myElement = document.getElementById("para12");
       myElement.style.marginLeft="21.1%";
}
*/
function marLeft1(parm,mar) {
	var br1 = navigator.userAgent.substring(25,29);
	var br2 = navigator.userAgent.substring(30,31);
    var br3 = parseFloat(br2);
	br4 = br3-1; 
    if ((br1 == 'MSIE') && (br3 < 8)) {
	   var myElement = document.getElementById(parm);
       myElement.style.marginLeft=mar+"%";
}
}
function makeCenter() {
	    var pw =getPageWidth();
		var sw = screen.width;
  		var ph = getPageHeight();
		var sh = screen.height;
		if (sw != 1280 ) {
			if (sw !=1024) 
				{return 0;} 
			}
		if (sw > 1200 && sh < 959) { return 0;}
		if (sw == 800) {return 0;}
		if (sh -(ph+240) > 0) {
				document.write('<style type="text/css">.centerCon {height: 50%;margin-top:'+(sh - (ph+240))/2+'px;}<\/style>');}
			else                                                                                  
			{document.write('<style type="text/css">.centerCon {height: 50%;margin-top: 0px;}<\/style>');}  
  }
function makeCenterContact() {
  		var ph = getPageHeight();
			var sh = screen.height;
			if (sh -(ph+206) > 0) {
				document.write('<style type="text/css">.centerCon {margin-top:'+(sh - (ph+270))/2+'px;}<\/style>');}
			else
	    	{ document.write('<style type="text/css">.centerCon {height: 50%;margin-top: 0px;}<\/style>');}
  }
function roundCorners(lt,rt,lb,rb,ccobj) {
	addEvent(window, 'load', initCorners);
	function initCorners() {
    	var settings = {
      		tl: { radius: lt },
      		tr: { radius: rt },
      		bl: { radius: lb },
      		br: { radius: rb },
      		antiAlias: true
    	}
	 	curvyCorners(settings, ccobj);
	}
}
var DDSPEED = 10;
var DDTIMER = 15;

// main function to handle the mouse events //
function ddMenu(id,d){
  var h = document.getElementById(id + '-ddheader');
  var c = document.getElementById(id + '-ddcontent');
  if (!c) {
	  return;
  }
  clearInterval(c.timer);
  if(d == 1){
    clearTimeout(h.timer);
    if(c.maxh && c.maxh <= c.offsetHeight){return}
    else if(!c.maxh){
      c.style.display = 'block';
      c.style.height = 'auto';
      c.maxh = c.offsetHeight;
      c.style.height = '0px';
    }
    c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
  }else{
    h.timer = setTimeout(function(){ddCollapse(c)},50);
  }
}

// collapse the menu //
function ddCollapse(c){
  c.timer = setInterval(function(){ddSlide(c,-1)},DDTIMER);
}

// cancel the collapse if a user rolls over the dropdown //
function cancelHide(id){
  var h = document.getElementById(id + '-ddheader');
  var c = document.getElementById(id + '-ddcontent');
  clearTimeout(h.timer);
  clearInterval(c.timer);
  if(c.offsetHeight < c.maxh){
    c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
  }
}

// incrementally expand/contract the dropdown and change the opacity //
function ddSlide(c,d){
  var currh = c.offsetHeight;
  var dist;
  if(d == 1){
    dist = (Math.round((c.maxh - currh) / DDSPEED));
  }else{
    dist = (Math.round(currh / DDSPEED));
  }
  if(dist <= 1 && d == 1){
    dist = 1;
  }
  c.style.height = currh + (dist * d) + 'px';
  c.style.opacity = currh / c.maxh;
  c.style.filter = 'alpha(opacity=' + (currh * 100 / c.maxh) + ')';
  if((currh < 2 && d != 1) || (currh > (c.maxh - 2) && d == 1)){
    clearInterval(c.timer);
  }
}
// Setup service details array  //
function setArray() {
    srvArry1[1] = "Consultations";
    srvArry2[1] = "Before starting any Internet project it is important to be clear in your own head exactly what your actually objectives are and how you are going to realise these."; 
	srvArry3[1] = "This service aims at guiding the potential web site owner to the correct set of objectives that will meet their requirements.";
	srvArry1[2] = "Web Site Planning";
	srvArry2[2] = "This is probably the most cost effective phases in any web site development. Getting the planning right from the start will reduce design, development and implementation phases of the project; if planning is properly addressed it should also save on future requirement.";
	srvArry3[2] = "This involves detailed specification of the requirements, design, test plan (where appopriate), development roadmap and implementation plan. The planning phase is a joint effort between the customer and myself; thus ensuring that the customer\'s requirements are adhered too.";
	srvArry1[3] = "Web Site Design";
	srvArry2[3] = "All web site designs are individual, i.e. no use of templates will be employed. The designs will be such that they will reflect the image that the customer wishes to project. The targeted audience will be an important feature in the design; as this will be the population that will be using the web site.";
	srvArry3[3] = "The design has to be approved by the customer before any development work is carried out; thus ensuring that the customer\'s requirements are achieved.";
	srvArry1[4] = "Web Site Development";
	srvArry2[4] = "The Development process of the web site will be dependent upon several major factors, e.g. Static or Dynamic site, content managed, database requirements (flat or relational), animation. Obviously the more complex the design the longer it will take to develop.";
	srvArry3[4] = "It may be possible to develop and implement a site stage by stage, this will be dependent on the complexity of the design.";
	srvArry1[5] = "Databases";
	srvArry2[5] = "There are basically 2 different database methodologies that can be implemented; the first being a flat database, this is ideal when low volumes of data are involved. The second is a relational database (MySQL); which is more suited to medium to large data volumes.";
	srvArry3[5] = "The database option is one that will be dependent on the objectives of the web site";
	srvArry1[6] = "Markup, Scripting and Tools";
	srvArry2[6] = "The actual coding style will be decided upon by the design of the web site. Some coding techniques are best suited to an objective better than other.";
	srvArry3[6] = "This is very much a technical area; but will be discussed during the planning of the web site, with various options explained in layman terms.";
}	
// Display the actual Service details //
function getTxtVal(txt1) {
	newTxt = srvArry1[txt1]; 
	svrt = document.createElement('p');	
    svrtc = document.createTextNode(newTxt);
    svrt.appendChild(svrtc);
	repText1 = document.getElementById('srv1');
	repText1.replaceChild(svrtc,repText1.firstChild);
	newTxt = srvArry2[txt1]; 
	svrt = document.createElement('p');	
    svrtc = document.createTextNode(newTxt);
    svrt.appendChild(svrtc);
	repText1 = document.getElementById('srv2');
	repText1.replaceChild(svrtc,repText1.firstChild);
	newTxt = srvArry3[txt1]; 
	svrt = document.createElement('p');	
    svrtc = document.createTextNode(newTxt);
    svrt.appendChild(svrtc);
	repText1 = document.getElementById('srv3');
	repText1.replaceChild(svrtc,repText1.firstChild);
	return;
}
		// Display or hide the Services details  //
function disp(which,show){
  if (!document.getElementById)
    return
  if (show=="hide") {
    which.style.display="none";
  }
  else {
    which.style.display="block";
	return;
  }
}
function dispyep(which,show,txt0) {
   getTxtVal(txt0);
	 var ret2 = disp(which,show);
}
