// JavaScript Document/////////////////////////////////////////////////////////////////////
//this document is full of sniplites and fuctions//////////////////////////////////////////
//that can be used at any time.  all you need to do////////////////////////////////////////
//is copy and paste and change the names and properties////////////////////////////////////
//with respect to your document////////////////////////////////////////////////////////////
//Author: Jeremy Dyson/////////////////////////////////////////////////////////////////////
//Copyright: WebDyson.com//////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////
//
//this is a basic rollover img function for the onmouseover attribute
function imageSwap_onmouseover(nameOfImage, imageSorce)
{	
	document[nameOfImage].src = imageSorce;
}
//this is a rollback image function for the onmouseout attribute
function imageSwap_onmouseout(nameOfImage, imageSorce)
{	
	document[nameOfImage].src = imageSorce;
}
///////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////
//this set of code is used for a banner you must change the name of the image for it to ///
//work properly////////////////////////////////////////////////////////////////////////////

function banner_onload()
{
	 var timer1 = setInterval("switchBannerImg('bannerImg',3)", 3000);//set the intervals to what you desire this example is 3000//
											//witch is 3 seconds
	 var timer2 = setInterval("addvertImg_onload('AddvertImg',4)",5500);
	 hideAll();
}		
var bannerImgNum = 1;
function switchBannerImg(imgName, a)
{		
	bannerImgNum++;
	document[imgName].src = "/images/wdimages/image"+bannerImgNum+".jpg";
	if(bannerImgNum > a)
	{
		bannerImgNum = 1;
		document[imgName].src = "/images/wdimages/image"+bannerImgNum+".jpg";
	}
	
}	
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
//this function will change the img and the link attached to the img/////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
var addvertImgNum=1;
var addvertImgTotal = 3;
var linkNumber=1;
function addvertImg_onload(imgName, linkName)
{

	addvertImgNum++;
	linkNumber++;

		document[imgName].src = "/images/wdimages/addvertImg" + addvertImgNum + ".JPG";
		document.links[linkName].href = "http://www.webdyson.com/wdd/addvert"+linkNumber+".html";
		if(addvertImgNum > addvertImgTotal && linkNumber > addvertImgTotal)
		{
			
			addvertImgNum = 1;
			document[imgName].src = "/images/wdimages/addvertImg" + addvertImgNum + ".JPG";
			linkNumber = 1;
			document.links[linkName].href = "http://www.webdyson.com/wdd/addvert"+linkNumber+".html";
		}
		
}
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
//this will change the links under the tabs
/////////////////////////////////////////////////////////////////////////////////////////////
function hideAll()
{
document.getElementById("webDesignNBL").style.visibility = "hidden";
document.getElementById("graphicDesignNBL").style.visibility = "hidden";
document.getElementById("DataBasesNBL").style.visibility = "hidden";
}
function NavList(elementId)
{	
	if(document.getElementById)
	{
		
		document.getElementById(elementId).style.visibility = "visible";
	}
	else if(document.layers)
	{
		document.layers[elementId].visibility = "show";
	}
	else if(document.all)
	{
		document.all[elementId].style.visibility = "visible";
	}
	
}
function showNavList(elementId,tabId)
{
	hideAll();
	NavList(elementId);
	
}
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////

