/* Declarations */
//alert(navigator.appName + " - " + navigator.userAgent);
var ffversion;

if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
 var ffversion=new Number(RegExp.$1) // capture x.x portion and store as a number 
}

var w;
var h;
var l;
var t;
var gradientshadow={}
gradientshadow.depth=6 //Depth of shadow in pixels
gradientshadow.containers=[]

gradientshadow.create=function(){
var a = document.all ? document.all : document.getElementsByTagName('*')
for (var i = 0;i < a.length;i++) {
	if (a[i].className == "shadow") {
		for (var x=0; x<gradientshadow.depth; x++){
			var newSd = document.createElement("DIV")
			newSd.className = "shadow_inner"
			newSd.id="shadow"+gradientshadow.containers.length+"_"+x //Each shadow DIV has an id of "shadowL_X" (L=index of target element, X=index of shadow (depth) 
			if (a[i].getAttribute("rel"))
				newSd.style.background = a[i].getAttribute("rel")
			else
				newSd.style.background = "#ffffff" //default shadow color if none specified
			document.body.appendChild(newSd)
		}
	gradientshadow.containers[gradientshadow.containers.length]=a[i]
	}
}
// Browser detection
var ie= document.all
if (ie)
{
     w=5;h=2;l=5;t=0;     
}
else
{   
    /*w=5;h=0;l=5;t=86;    */
    w=5;h=2;l=5;t=0;
}

gradientshadow.position()
window.onresize=function(){
	gradientshadow.position()
}
}
gradientshadow.position=function(){
if (gradientshadow.containers.length>0){
	for (var i=0; i<gradientshadow.containers.length; i++){	
		for (var x=0; x<gradientshadow.depth; x++){
  		var shadowdiv=document.getElementById("shadow"+i+"_"+x)  		
			shadowdiv.style.width = (gradientshadow.containers[i].offsetWidth+w) + "px"
			shadowdiv.style.height = (gradientshadow.containers[i].offsetHeight+h) + "px"
			shadowdiv.style.left = (gradientshadow.containers[i].offsetLeft-l) + x + "px"
			shadowdiv.style.top = (gradientshadow.containers[i].offsetTop+t) + x + "px"
		}
	}
}
}

if (window.addEventListener)
window.addEventListener("load", gradientshadow.create, false)
else if (window.attachEvent)
window.attachEvent("onload", gradientshadow.create)
else if (document.getElementById)
window.onload=gradientshadow.create



/***********************************************************************************************************/
/*                                  Services Page webdesign grdient                                        */                     
/***********************************************************************************************************/

var servicesgradientshadow={}
servicesgradientshadow.depth=6 //Depth of shadow in pixels
servicesgradientshadow.containers=[]

servicesgradientshadow.create=function(){
var a = document.all ? document.all : document.getElementsByTagName('*')
for (var i = 0;i < a.length;i++) {
	if (a[i].className == "divServicesShadow") {
		for (var x=0; x<servicesgradientshadow.depth; x++){
			var newSd = document.createElement("DIV")
			newSd.className = "shadow_inner"
			newSd.id="divServicesShadow"+servicesgradientshadow.containers.length+"_"+x //Each shadow DIV has an id of "shadowL_X" (L=index of target element, X=index of shadow (depth) 
			if (a[i].getAttribute("rel"))
				newSd.style.background = a[i].getAttribute("rel")
			else
				newSd.style.background = "#ffffff" //default shadow color if none specified
			document.body.appendChild(newSd)
		}
	servicesgradientshadow.containers[servicesgradientshadow.containers.length]=a[i]
	}
}
// Browser detection
var ie= document.all
if (ie)
{
 /*    w=0;h=0;l=0;t=0;*/
 w=8;
 h=8;
 l=7;
 t=7;
}
else
{   
     /*w=0;h=0;l=0;t=0;*/
    w=8;
    h=8;
    l=7;
    t=7;
}

servicesgradientshadow.position()
window.onresize=function(){
	servicesgradientshadow.position()
}
}
servicesgradientshadow.position=function(){
if (servicesgradientshadow.containers.length>0){
	for (var i=0; i<servicesgradientshadow.containers.length; i++){	
		for (var x=0; x<servicesgradientshadow.depth; x++){
  		var shadowdiv=document.getElementById("divServicesShadow"+i+"_"+x)  		
			shadowdiv.style.width = (servicesgradientshadow.containers[i].offsetWidth+w) + "px"
			shadowdiv.style.height = (servicesgradientshadow.containers[i].offsetHeight+h) + "px"
			shadowdiv.style.left = (servicesgradientshadow.containers[i].offsetLeft-l) + x + "px"
			shadowdiv.style.top = (servicesgradientshadow.containers[i].offsetTop-t) + x + "px"
		}
	}
}
}

if (window.addEventListener)
window.addEventListener("load", servicesgradientshadow.create, false)
else if (window.attachEvent)
window.attachEvent("onload", servicesgradientshadow.create)
else if (document.getElementById)
window.onload=servicesgradientshadow.create


