//edit the below 5 steps

// 1) substitute 116 and 42 with the width and height of your logo image, respectively
var logowidth=40
var logoheight=32
var logoimage=new Image(logowidth,logoheight)
var linktarget = 'target=_blank';

// 2) change the image path to reflect the path of your logo image
logoimage.src="/images/utility/bug.gif"

// 4) change the alttext variable to reflect the text used for the "alt" attribute of the image tag
var alttext="Smart Bug"

// 5) Finally, below variable determines the duration the logo should be visible after loading, in seconds. If you'd like the logo to appear for 20 seconds, for example, enter 20. Entering a value of 0 causes the logo to be perpectually visible. 
var visibleduration=0

// Optional parameters
var Hoffset=6 //Enter logo's offset from right edge of window (edit only if you don't like the default offset)
var Voffset=6 //Enter logo's offset from bottom edge of window (edit only if you don't like the default offset)


///////////////////////////Do not edit below this line/////////////////////////

var ie=document.all&&navigator.userAgent.indexOf("Opera")==-1

var watermark_obj

function insertimage(){
if (ie||document.getElementById)
watermark_obj.innerHTML='<a href="'+logolink+'"' + linktarget + '><img src="'+logoimage.src+'" width="'+logowidth+'" height="'+logoheight+'" border=0 alt="'+alttext+'"></a>'
else if (document.layers){
watermark_obj.document.write('<a href="'+logolink+'" target=_blank"><img src="'+logoimage.src+'" width="'+logowidth+'" height="'+logoheight+'" border=0 alt="'+alttext+'"></a>')
watermark_obj.document.close()
}
}

function positionit(){
var dsocleft=ie? document.body.scrollLeft : window.pageXOffset
var dsoctop = 0;

if (document.documentElement && !document.documentElement.scrollTop) {
	dsoctop = 0;
} else if (document.documentElement && document.documentElement.scrollTop) {
	dsoctop = document.documentElement.scrollTop;
} else if (document.body && document.body.scrollTop) {
	dsoctop = document.body.scrollTop;
} else {
	dsoctop = window.pageYOffset;
}

var window_width = 0
if (document.documentElement && !document.documentElement.clientWidth) {
	window_width = 0;
} else if (document.documentElement && document.documentElement.clientWidth) {
	window_width = document.documentElement.clientWidth;
} else if (document.body && document.body.clientWidth) {
	window_width = document.body.clientWidth;
} else {
	window_width = window.innerWidth-20;
}

var window_height = 0
if (document.documentElement && !document.documentElement.clientHeight) {
	window_height = 0;
} else if (document.documentElement && document.documentElement.clientHeight) {
	window_height = document.documentElement.clientHeight;
} else if (document.body && document.body.clientHeight) {
	window_height = document.body.clientHeight;
} else {
	window_height = window.innerHeight;
}

if (document.getElementById){
	watermark_obj.style.left=parseInt(dsocleft)+parseInt(window_width)-logowidth-Hoffset + 'px';
	watermark_obj.style.top=parseInt(dsoctop)+parseInt(window_height)-logoheight-Voffset + 'px';
} else if (document.layers){
	watermark_obj.left=dsocleft+window_width-Hoffset-logowidth
	watermark_obj.top=dsoctop+window_height-logoheight-Voffset
}
showwatermark()
}

function showwatermark(){
if (document.layers)
watermark_obj.visibility="show";
else
watermark_obj.style.visibility="visible";
}

function hidewatermark(){
if (document.layers)
watermark_obj.visibility="hide"
else
watermark_obj.style.visibility="hidden"
clearInterval(watermarkinterval)
}

function beingwatermark(){

watermark_obj=ie? document.all.watermarklogo : document.getElementById? document.getElementById("watermarklogo") : document.watermarklogo;

watermarkinterval=setInterval("positionit()",50)
insertimage()
if (visibleduration!=0)
setTimeout("hidewatermark()",visibleduration*1000)
}