
function viewImage(dir, file) {
	
	document.location = 'ViewImage.html?file=' + file + '&type=' + dir;

}

function getAttribute(paramName) {

	var query = location.search.substring(1)
	var arr = query.split('&')
	for(var i = 0; i < arr.length; i++) {
		var pair = arr[i].split('=')
		if(paramName == pair[0]) {
			return pair[1]
		}
	}

}

function goTo(dest) {

	switch(dest) {
		case('vg'): location.href="VehicleGraphics.html"
					break;
		case('dp'): location.href="DigitalPrinting.html"
					break;
		case('pf'): location.href="PoliceFire.html"
					break;
		case('ms'): location.href="MunicipalSignage.html"
					break;
		case('sb'): location.href="SignsBanners.html"
					break;
		case('home'): location.href="index.html"
					break;
		case('cu'): location.href="ContactUs.html"
					break;
		default: location.href="index.html"
					break;
	}
}


function goTop() {

	location.href="#top"
}

//logical dir names
var dpDirName = 'DigitalPrinting'
var vgDirName = 'VehicleGraphics'
var fireDirName = 'Police-Fire-EMS/Fire'
var polDirName = 'Police-Fire-EMS/Police'
var munDirName = 'Municipal'
var sbDirName = 'SignsBanners'
var dirName = ''

function goBack() {

	if(dirName == vgDirName) {
		location.href = "VehicleGraphics.html"
	} else if (dirName == dpDirName) {
		location.href = "DigitalPrinting.html"
	} else if (dirName == fireDirName) {
		location.href = "PoliceFire.html#fire"
	} else if (dirName == polDirName) {
		location.href = "PoliceFire.html"
	} else if (dirName == munDirName) {
		location.href = "MunicipalSignage.html"
	} else if (dirName == sbDirName) {
		location.href = "SignsBanners.html"
	} 
}