
//Sample usages
//disableSelection(document.body) //Disable text selection on entire body
//disableSelection(document.getElementById("mydiv")) //Disable text selection on element with id="mydiv"
//URL I got this from http://www.dynamicdrive.com/dynamicindex9/noselect.htm -tg
function disableMaterial() {
	if (document.getElementById("index_of_refraction").value!='') {
	document.getElementById("material").disabled=true;
	document.getElementById("material").value='';
	}else {
	document.getElementById("material").disabled=false;
	}
}

function show(object,val) {
document.getElementById(object).style.visibility = val;
}

function showTwoObjects(object1,value1,object2,value2) {
document.getElementById(object1).style.visibility = value1;
document.getElementById(object2).style.visibility = value2;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}

// Add Bookmark
function addToFavorites() { 
	if (window.external) { 
		window.external.AddFavorite("http://www.thelensguru.com/","startSearch.php") 
	} 
	else { 
		alert("Sorry! Your browser doesn't support this function."); 
	} 
} 

// display/hide transparent popup
function clicker(){
	var thediv=document.getElementById('displaybox');
	if(thediv.style.display == "none"){
		thediv.style.display = "";
	}else{
		thediv.style.display = "none";
	}
	return false;
}

