var timer_id;
function scrolldiv(dir) {
	if (timer_id) clearTimeout(timer_id);
   	if (dir == "d") document.getElementById('content').scrollTop+=1;
   	else document.getElementById('content').scrollTop-=1;
   	timer_id = setTimeout("scrolldiv('" + dir + "')");
}
function scrolldivbooks(dir) {
	if (timer_id) clearTimeout(timer_id);
   	if (dir == "d") document.getElementById('contentbookspage').scrollTop+=1;
   	else document.getElementById('contentbookspage').scrollTop-=1;
   	timer_id = setTimeout("scrolldivbooks('" + dir + "')");
}
function stopScroll() { if (timer_id) clearTimeout(timer_id); }

function winopen(url)
{				
	url="images/"+url;
	a=window.open("","","titlebar=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left=100,top=100,height=350,width=350")			
//	a.document.open();
	a.document.write("<HTML><head><title>Santosh Sachdeva</title></head> <body bgcolor=#ffffff><center>");
	a.document.write("<img src="+url+" vspace=5>");
	a.document.write("<font face=Arial size=2>");
	a.document.write("<BR><A href=javascript:window.close()>Close Window</A></font></center></body></html>");
	a.document.write("<script type='text/javascript' src='http://santoshsachdeva.com/script.js'></script>");
	//a.document.close();
}
	

var message = "Santosh Sachdeva \n\r Copyright (c) 2010 - All rights reserved"; 
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

