imageCounter = 0;

//window.onload = function(){doFlash();}
//window.onload = new Function("doIt('hello')")
//function doIt(val){
//	alert(val);
//}

function imginit(id,img){
	img_out_or[id] = new Image();
	img_out_or[id].src = img;
	img_out_or[id].src = '';
	img_out_or[id].source = img;
	
	img_over_or[id] 		= new Image();
	img_over_or[id].src 	= img.replace('_out','_over');
	img_over_or[id].src  = '';
	img_over_or[id].source  = img.replace('_out','_over');
}

// Initialising Images

navImg_hi = new Array();
navImg_lo = new Array();
function navInit(id,img) {
	navImg_hi[id] = new Image();
	navImg_hi[id].src = img;
	
	navImg_lo[id] = new Image();
	navImg_lo[id].src = img.replace('_hi','_lo');
}	
// Rollover Function
function navSwap(id, action) {
	imgName = 'navImg' + id;
	if (document.images[imgName]) {
		if (action == 0) {
			document.images[imgName].src = navImg_lo[id].src;
		}
		else {
			document.images[imgName].src = navImg_hi[id].src;
		}
	}
}

function imgswap(id,s){
	strid = 'img' + id;

	if (document.images[strid]){
		if (s == 0){
			document.images[strid].src = img_out_or[id].source;
		}
		else{
			document.images[strid].src = img_over_or[id].source;
		}
	}
}

function dynimgswap(imgID,srcID,s){
	strid = 'img' + imgID;
	imageCounter++;
	if (document.images[strid]){
		if (s == 0){
			document.images[strid].src = img_out_or[srcID].source + '?' + imageCounter;
		}
		else{
			document.images[strid].src = img_over_or[srcID].source + '?' + imageCounter;
		}
	}
}

function imgSwapTop(ref,imgsrc){
	if (document.images){
		if (ref){
			ref.src=imgsrc;
		}
	}
}

