// 
// Protect Images (requires JQuery)
//
var imageprotectmsg1="This photograph is exclusively owned by Kasidie.com";
var imageprotectmsg2="This photograph is exclusively owned by Kasidie.com";

var DH = 0;var an = 0;var al = 0;var ai = 0;if (document.getElementById) {ai = 1; DH = 1;}else {if (document.all) {al = 1; DH = 1;} else { browserVersion = parseInt(navigator.appVersion); if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {an = 1; DH = 1;}}} function fd(oi, wS) {if (ai) return wS ? document.getElementById(oi).style:document.getElementById(oi); if (al) return wS ? document.all[oi].style: document.all[oi]; if (an) return document.layers[oi];}
function pw() {return window.innerWidth != null? window.innerWidth: document.body.clientWidth != null? document.body.clientWidth:null;}
function mouseX(evt) {if (evt.pageX) return evt.pageX; else if (evt.clientX)return evt.clientX + (document.documentElement.scrollLeft ?  document.documentElement.scrollLeft : document.body.scrollLeft); else return null;}
function mouseY(evt) {if (evt.pageY) return evt.pageY; else if (evt.clientY)return evt.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); else return null;}
function popUp(evt,divnum) {if (DH) {var wp = pw(); ds = fd("imageprotecttooltipdiv" + divnum,1); dm = fd("imageprotecttooltipdiv" + divnum,0); st = ds.visibility; if (dm.offsetWidth) ew = dm.offsetWidth; else if (dm.clip.width) ew = dm.clip.width; if (st == "visible" || st == "show") { ds.visibility = "hidden"; } else {tv = mouseY(evt) + 20; lv = mouseX(evt) - (ew/4); if (lv < 2) lv = 2; else if (lv + ew > wp) lv -= ew/2; if (!an) {lv += 'px';tv += 'px';} ds.left = lv; ds.top = tv; ds.visibility = "visible";}}}
//function ignorerightclick(evt,divnum) { var msg = fd("imageprotecttooltipdiv" + divnum,0).innerHTML; if (navigator.appName == 'Netscape' && evt.which == 3) { alert(msg); return false; } if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) { alert(msg); return false; } else return true; }

document.writeln("<style>");
document.writeln(".tip {font:10px/12px");
document.writeln("Arial,Helvetica,sans-serif; border:solid 1px");
document.writeln("#666666; padding:1px;");
document.writeln("position:absolute; z-index:100;");
document.writeln("visibility:hidden; color:#333333; top:20px;");
document.writeln("left:90px; background-color:#ffffcc;");
document.writeln("layer-background-color:#ffffcc;}");
document.writeln("</style>");

// Div for the tooltip 1
document.writeln("<div id='imageprotecttooltipdiv1' class='tip'>");
document.writeln(imageprotectmsg1);
document.writeln("</div>");

// Div for the tooltip 2
document.writeln("<div id='imageprotecttooltipdiv2' class='tip'>");
document.writeln(imageprotectmsg2);
document.writeln("</div>");

// Protect all images in the document
$(document).ready(function() {
	$("img").bind("contextmenu",function(e){return false;});
	$("img").bind("mouseup",function(e){return false;});
	$("img").bind("mousedown",function(e){return false;});
	$("img").bind("dragstart",function(e){return false;});
	$("img").bind("selectstart",function(e){return false;});
});

//
// Protect images within a container (good for refreshed divs)
//
function imageprotect_protectimages(containername) {
	$(containername).find("img").bind("contextmenu",function(e){return false;});
	$(containername).find("img").bind("mouseup",function(e){return false;});
	$(containername).find("img").bind("mousedown",function(e){return false;});
	$(containername).find("img").bind("dragstart",function(e){return false;});
	$(containername).find("img").bind("selectstart",function(e){return false;});
}