function init() {
	detectBrowser();
	laptopScreenOpacity = 0.6;
}

function detectBrowser(){
	browserIE = (navigator.appName == 'Microsoft Internet Explorer') ? true : false;
}

function highlightScreen(laptopVisualHolder) {
	changeScreen(laptopVisualHolder, 1);
}

function dimScreen(laptopVisualHolder) {
	changeScreen(laptopVisualHolder, laptopScreenOpacity);
}

function changeScreen(thisLaptopVisualHolder, thisLaptopScreenOpacity){
	var laptopVisual = thisLaptopVisualHolder.getElementsByTagName('img')[0];
	
	if (browserIE) {
		laptopVisual.style.setAttribute('filter', 'alpha(opacity=' + (thisLaptopScreenOpacity * 100) + ')');
	} else {
		laptopVisual.style.setProperty('opacity', thisLaptopScreenOpacity, '');
	}
}

function addImageHover(thisImage) {
	imageSrcFilenameLength = thisImage.src.length-4;
	imageSrcFilename = thisImage.src.substr(0, imageSrcFilenameLength);
	imageSrcExtension = thisImage.src.substr(imageSrcFilenameLength,4);
	thisImage.src = imageSrcFilename + '_hover' + imageSrcExtension;
}

function removeImageHover(thisImage) {
	imageSrcFilenameLength = thisImage.src.length-4;
	imageSrcFilename = thisImage.src.substr(0, imageSrcFilenameLength-6);
	imageSrcExtension = thisImage.src.substr(imageSrcFilenameLength,4);
	thisImage.src = imageSrcFilename + imageSrcExtension;
}


