/*****************************************************************

$RCSfile: default.js,v $

$Date: 2005/04/04 21:40:11 $
       
$Revision: 1.2 $

*****************************************************************/


	function MM_reloadPage(init) {  //reloads the window if Nav4 resized
	  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
		document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
	  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
	}
	MM_reloadPage(true);
	

	//****************************************************
	// this is the javascript that pieces the address 
	// together and launches the default mail application
	//****************************************************
	
	function domail(domain, name) {
	
		var newWin = window.open("mailto:"+name+"@"+domain+"?subject=Email From rogersacoustics.com Website");
		if (newWin && newWin!=null) newWin.close();
	}
	
	function initImage(imageId) {
		image = document.getElementById(imageId);
		setOpacity(image, 0);
		image.style.visibility = "visible";
		fadeIn(imageId,0);
	}
	
	function fadeIn(objId,opacity) {
		if (document.getElementById) {
			obj = document.getElementById(objId);
			if (opacity <= 100) {
				setOpacity(obj, opacity);
				opacity += 10;
				window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100);
			}
		}
	}
	
	function setOpacity(obj, opacity) {
		opacity = (opacity == 100)?99.999:opacity;
		// IE/Win
		obj.style.filter = "alpha(opacity:"+opacity+")";
		// Safari<1.2, Konqueror
		obj.style.KHTMLOpacity = opacity/100;
		// Older Mozilla and Firefox
		obj.style.MozOpacity = opacity/100;
		// Safari 1.2, newer Firefox and Mozilla, CSS3
		obj.style.opacity = opacity/100;
	}
	