<script language="JavaScript" src="../../Common/Html/atlas.js"></script>
<SCRIPT language="JavaScript">
var centerWidth = 486;
var centerHeight = 385;
var randTeeth = new Array();
randTeeth[0] = 13;
randTeeth[1] = 16;
randTeeth[2] = 17;
randTeeth[3] = 23;
function calcOpacity() {
xOff = event.clientX - getAbsoluteLeft(centerDiv) + 151;
yOff = event.clientY - getAbsoluteTop(centerDiv) + 88;
xFrac = xOff/centerWidth;
yFrac = yOff/centerHeight;
// window.status = "xOff, yOff ... xFrac, yFrac: (" + xOff + ", " + yOff + ") " + xFrac + ", " + yFrac;
photoFrac = Math.min(100, Math.max(0, (1.0 - yFrac)*100))
simulatedFrac = Math.min(100, Math.max(0, (1.0 - xFrac)*100));
photoImg.filters.item("DXImageTransform.Microsoft.Alpha").opacity = photoFrac;
simulatedImg.filters.item("DXImageTransform.Microsoft.Alpha").opacity = simulatedFrac;
}
function initSplashPage() {
initPage();
// CRAIG SUCKS BIG TIME !!!!!!!
// INSTEAD OF RELYING ON INITPAGE(), HE MAY AS WELL HARD CODE 'tn', SINCE ONLY '13' WILL WORK!!!
tn = 13;
if(tn == 13) { rNum = Math.random()*randTeeth.length;
tn = randTeeth[Math.floor(rNum)];
}
photoImg.src = "../../Data/tooth" + tn + "/misc/splashPhoto.jpg";
simulatedImg.src = "../../Data/tooth" + tn + "/misc/splashSimulated.jpg";
xrayImg.src = "../../Data/tooth" + tn + "/misc/splashXray.jpg";
document.onmousemove = calcOpacity; // put this in the init function so it doesn't execute until the page is loaded and the objects required exist
}
how to add this java Script to Asp.net
|