Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
";
}
function constructToolTipA(elem){
//constructing the tooltip, so this must be the new selected element!
selectedElement=elem;
var previous_id = elem.getAttribute("previous");
var next_id = elem.getAttribute("next");
var change_id = elem.getAttribute("changeId");
return "
";
}
function constructToolTipR(elem){
//constructing the tooltip, so this must be the new selected element!
selectedElement=elem;
var previous_id = elem.getAttribute("previous");
var next_id = elem.getAttribute("next");
var change_id = elem.getAttribute("changeId");
return "
";
}
function tip2(anchor){
var destinationLink = document.getElementById(anchor);
if(destinationLink.className =='diff-html-changed'){
tipC2(destinationLink, constructToolTipC(destinationLink));
}else if(destinationLink.className =='diff-html-added'){
tipA2(destinationLink, constructToolTipA(destinationLink));
}else if(destinationLink.className =='diff-html-removed'){
tipR2(destinationLink, constructToolTipR(destinationLink));
}else{
//the anchor points to a 'first-...' or 'last-...' link; make it selected
selectedElement=destinationLink;
}
}
function tipC2(destinationLink, content){
Tip(content, FIX, FixCalcXY(destinationLink, 2,20), BALLOONSTEMWIDTH, 0, BALLOONSTEMHEIGHT, 0, DURATION, 20000, CLICKCLOSE, true, FOLLOWMOUSE, false, STICKY, true, OFFSETX, 1, FADEIN, 100, FADEOUT, 100, PADDING, 5);
}
function tipR2(destinationLink, content){
Tip(content, FIX, FixCalcXY(destinationLink, 2,20), BALLOONSTEMWIDTH, 0, BALLOONSTEMHEIGHT, 0, DURATION, 20000, CLICKCLOSE, true, FOLLOWMOUSE, false, STICKY, true, OFFSETX, 1, FADEIN, 100, FADEOUT, 100, PADDING, 5);
}
function tipA2(destinationLink, content){
Tip(content, FIX, FixCalcXY(destinationLink, 2,20), BALLOONSTEMWIDTH, 0, BALLOONSTEMHEIGHT, 0, DURATION, 20000, CLICKCLOSE, true, FOLLOWMOUSE, false, STICKY, true, OFFSETX, 1, FADEIN, 100, FADEOUT, 100, PADDING, 5);
}
function FixCalcXY(el, xoffset, yoffset){
//fix for images inside the span
var imagesContained = el.getElementsByTagName("img");
var imageHeight=0;
if(!window.event && imagesContained.length > 0){
imageHeight=imagesContained[0].offsetHeight;
}
var xy = dojo.html.getAbsolutePosition(el, true);
return [xy.x+xoffset, xy.y+yoffset-imageHeight];
}
function changeClass(changeId, newCl){
var allSpans = document.getElementsByTagName('span');
// Walk through the list
for (var i=0;i and n
var target;
if(isPrev){
target=selectedElement.getAttribute("previous");
}else if(isNext){
target=selectedElement.getAttribute("next");
}
//custom hack for span support
var destinationLink = document.getElementById(target);
// If we didn't find a destination, give up and let the browser do
// its thing
if (!destinationLink){
return;
}
scrollToTarget(destinationLink);
}
function scrollToEvent(e) {
// This is an event handler; get the clicked on element,
// in a cross-browser fashion
if (window.event) {
target = window.event.srcElement;
} else if (e) {
target = e.target;
} else {
throw("unsupported browser");
return true;
}
// Make sure that the target is an element, not a text node
// within an element
if (target.nodeType == 3 || target.nodeName.toLowerCase()=="img") {
target = target.parentNode;
}
// Paranoia; check this is an A tag
if (target.nodeName.toLowerCase() != 'a'){
throw("target is not an anchor");
return true;
}
// Find the tag corresponding to this href
// First strip off the hash (first character)
anchor = target.hash.substr(1);
//custom hack for span support
var destinationLink = document.getElementById(anchor);
var continueEvent = scrollToTarget(destinationLink);
// And stop the actual click happening
if (!continueEvent && window.event) {
window.event.cancelBubble = true;
window.event.returnValue = false;
}
if (!continueEvent && e && e.preventDefault && e.stopPropagation) {
e.preventDefault();
e.stopPropagation();
}
return continueEvent;
}
function scrollToTarget(destinationLink){
// If we didn't find a destination, give up and let the browser do
// its thing
if (!destinationLink){
throw("unknown destination");
return true;
}
var xy = FixCalcXY(destinationLink, 0,-10);
//scroll
window.scrollTo( xy[0], xy[1]);
setTimeout("tip2('"+destinationLink.id+"')", 0);
//if, because otherwise it's not threadsafe-ish
if(destinationLink.className != "diff-html-selected"){
if(selectedElement.getAttribute("oldClass") && selectedElement.getAttribute("oldClass").length>0 && selectedElement.getAttribute("oldClass")!=selectedElement.className){
changeClass(selectedElement.id, selectedElement.getAttribute("oldClass"));
}
setTimeout("changeClass('"+destinationLink.id+"', 'diff-html-selected')", 1);
destinationLink.setAttribute("oldClass",destinationLink.className)
setTimeout("changeClass('"+destinationLink.id+"', '"+destinationLink.className+"')", 2000);
}
return false;
}