
var Mess="www.thanjavurpaintings.com";
var pos=1;

function winstatIn() {
window.status=Mess.substring(0, pos);
if (pos >= Mess.length) {
pos=1;
window.setTimeout("winstatOut()",300); 
} else {
pos++;
window.setTimeout("winstatIn()",50); 
   } 
}

function winstatOut() {
window.status=Mess.substring(pos, Mess.length);
if (pos >= Mess.length) {
pos=1;
window.setTimeout("winstatIn()", 100);
} else {
pos++;
window.setTimeout("winstatOut()", 50);
   }
}


function rtclick()
{
	if (document.layers){
    		OpenWin.window.onmousedown = function(){return false;}
	}
	else{
		alert("Sorry, you don't have permission to Click");
		return false;
	}
	return false;
}

function view(page)
{
var namearry=page.split("/");
var namearry1=namearry[0];
var namearry2=namearry[1];
var namearry3=namearry[2];
var namearry4=namearry[3];
var windname=namearry4.split(".");
var wname=windname[0];

OpenWin=window.open(page,"_blank","menubar=no,toolbar=no,location=no,directories=no,scrollbars=yes,resizable=yes,status=no,top=0,left=0,height=550,width=795");

OpenWin.document.open();
OpenWin.document.write("<html>");
OpenWin.document.write("<head>");
//OpenWin.document.write('<META HTTP-EQUIV="Pragma" CONTENT="no-cache">'); 
OpenWin.document.write("<title>Full View");
OpenWin.document.write("</title>");
OpenWin.document.write("<script>");
OpenWin.document.write("document.onmousedown=right;document.onmouseup=right;");
OpenWin.document.write("if (document.layers) window.captureEvents(Event.MOUSEDOWN);");
OpenWin.document.write("if (document.layers) window.captureEvents(Event.MOUSEUP);");
OpenWin.document.write("window.onmousedown=right;");
OpenWin.document.write("window.onmouseup=right;");
OpenWin.document.write("function right(e){");
OpenWin.document.write("if ((navigator.appName == '"+"Netscape"+"') && (e.which == 3 || e.which == 2))");
OpenWin.document.write("{document.images[0].onmousedown = ");
OpenWin.document.write('alert("Oops.........");');
OpenWin.document.write("return false;}");
//OpenWin.document.write("else if ((navigator.appName == 'Microsoft Internet Explorer') && (event.button == 2 || event.button == 3)){");

OpenWin.document.write("else if (event.button == 2 || event.button == 3){");
OpenWin.document.write('alert("Oops.........");');
OpenWin.document.write("return false;}return true;}");
OpenWin.document.write("</script>");
OpenWin.document.write("</head>");

OpenWin.document.write("<body>");
OpenWin.document.write('<img src ="'+page+'"');
OpenWin.document.write('>');
OpenWin.document.write('<p align="justify"><b>Please note that <font color="#ff0000">"©www.thanjavurpaintings.com"</font> will not appear in the actual painting.</b></p>');

OpenWin.document.write("</body>");
OpenWin.document.write("</html>");
OpenWin.document.close();
return;
}

function changename(paintname)
{
	if(paintname != 'empty.gif')
	{
		var name1,name2,name3;
		var imgarry = paintname.split("/");
		name1 = imgarry[0];
		name2 = imgarry[1];
		name3 = "view/cfull"+imgarry[2];
		var fname = name1+"/"+name2+ "/"+name3;
		view(fname);
		return;
	}
	else
	{
		alert("Please select the Painting Name");
		return;
	}

}