Team:Warsaw/test komorka

div.komHide { background-repeat:no-repeat; position:absolute; visibility:hidden; }

.komVisible { background-repeat:no-repeat; position:absolute; cursor:pointer; visibility:visible; }

.textHide { visibility: hidden;} .textVisible { visibility: visible;}

.blacknwhite { background-repeat:no-repeat; position:absolute; cursor:pointer; visibility:visible;}

function showTip(thisText) { isShowing = true; document.getElementById("tekscik").style.left = mouseX-300+"px"; document.getElementById("tekscik").style.top = mouseY-170+document.body.scrollTop+"px"; document.getElementById("tekscik").innerHTML = thisText; document.getElementById("tekscik").style.display = "block"; }

function hideTip { document.getElementById("tekscik").style.display = "none"; isShowing = false; }

function tipPosition(callingEvent) { if (!callingEvent) callingEvent = window.event; mouseX = callingEvent.clientX; mouseY = callingEvent.clientY-1; if (isShowing) {	document.getElementById("tekscik").style.left = mouseX-300+"px"; document.getElementById("tekscik").style.top = (!is_safari) ? mouseY-170+document.body.scrollTop+"px" : mouseY-170+"px" ; } }

function changeDivBackground (thisArea, thisURL) {

document.getElememtById(thisArea).style.backgroundImage = "url("+ thisURL + ")";

}

function toggleOn(thisArea,thisText) { clearHighlights; document.getElementById(thisArea).className = "komVisible"; showTip(thisText); }

function toggleOff { document.getElementById("kom_main").style.backgroundImage = "url(http://2009.igem.org/wiki/images/5/5f/Kom_colour.png)"; hideTip; }

function toggleOff1(thisArea) { document.getElementById(thisArea).className = "komHide"; }

function clearHighlights {  document.getElementById("kom4b").className = "komHide"; document.getElementById("kom1").className = "komHide"; document.getElementById("kom2").className = "komHide"; document.getElementById("kom3a").className = "komHide"; document.getElementById("kom3b").className = "komHide"; document.getElementById("kom_main").style.backgroundImage = "url(http://2009.igem.org/wiki/images/6/67/Blacknwhite.png)"; }

document.onmousemove = tipPosition;

























TEST

