var gradientshadow={}
gradientshadow.depth=6 //Depth of shadow in pixels
gradientshadow.containers=[]

gradientshadow.create=function(){
var a = document.all ? document.all : document.getElementsByTagName('*')
for (var i = 0;i < a.length;i++) {
	if (a[i].className == "shadow") {
		for (var x=0; x<gradientshadow.depth; x++){
			var newSd = document.createElement("DIV")
			newSd.className = "shadow_inner"
			newSd.id="shadow"+gradientshadow.containers.length+"_"+x //Each shadow DIV has an id of "shadowL_X" (L=index of target element, X=index of shadow (depth) 
			if (a[i].getAttribute("rel"))
				newSd.style.background = a[i].getAttribute("rel")
			else
				newSd.style.background = "black" //default shadow color if none specified
			document.body.appendChild(newSd)
		}
	gradientshadow.containers[gradientshadow.containers.length]=a[i]
	}
}
gradientshadow.position()
window.onresize=function(){
	gradientshadow.position()
}
}

gradientshadow.position=function(){
if (gradientshadow.containers.length>0){
	for (var i=0; i<gradientshadow.containers.length; i++){
		for (var x=0; x<gradientshadow.depth; x++){
  		var shadowdiv=document.getElementById("shadow"+i+"_"+x)
			shadowdiv.style.width = gradientshadow.containers[i].offsetWidth + "px"
			shadowdiv.style.height = gradientshadow.containers[i].offsetHeight + "px"
			shadowdiv.style.left = gradientshadow.containers[i].offsetLeft + x + "px"
			shadowdiv.style.top = gradientshadow.containers[i].offsetTop + x + "px"
		}
	}
}
}
function show_photo( pFileName, pTitle, pCaption) {
	// specify window parameters
	photoWin = window.open( "", "photo","width=600,height=465,status,scrollbars,resizable=no,screenX=10,screenY=10,left=10,top=10");
	// wrote content to window
	photoWin.document.write('<html><head><title>' + pTitle + '</title></head>'); photoWin.document.write('<BODY style="background-image: url(images/mbg.png);">');
	photoWin.document.write('<p style="letter-spacing:0.1em;"><font size=+1 face="Tahoma,arial"><center><b>' + pCaption + 	'</b></center></font></p><br>');
	photoWin.document.write('<p></p><center><img src="' + pFileName + '"></center>');
	photoWin.document.write('</body></html>');
	photoWin.document.close(); 
} 
function show_photo1( pFileName, pTitle, pCaption) {
	// specify window parameters
	photoWin = window.open( "", "photo","width=500,height=580,status,scrollbars,resizable=no,screenX=10,screenY=10,left=10,top=10");
	// wrote content to window
	photoWin.document.write('<html><head><title>' + pTitle + '</title></head>'); photoWin.document.write('<BODY style="background-image: url(images/mbg.png);">');
	photoWin.document.write('<p style="letter-spacing:0.1em;"><font size=+1 face="Tahoma,arial"><center><b>' + pCaption + 	'</b></center></font></p><br>');
	photoWin.document.write('<p></p><center><img src="' + pFileName + '"></center>');
	photoWin.document.write('</body></html>');
	photoWin.document.close(); 
} 
function validate()
{
if(document.myform.user.value=="")
{
alert("Please enter your Name");
document.myform.user.select();
document.myform.user.focus();
return false;
}
if(document.myform.emailaddress.value=="")
{
alert("Please enter your E-Mail ID");
document.myform.emailaddress.focus();
return false;
}
if(document.myform.comments.value=="")
{
alert("Please enter your feedback / enquiry");
document.myform.comments.focus();
return false;
}
if(document.myform.emailaddress.value!="")
{
var s = document.myform.emailaddress.value;
x=s.indexOf('@',2);
y=s.indexOf('.',3);
if(x<0 | y<0)
{
alert("Please enter a valid E-Mail ID");
document.myform.emailaddress.select();
document.myform.emailaddress.focus();
return false;
}
}
}
function validate1()
{
if(document.myform1.user.value=="")
{
alert("Please enter your Name");
document.myform1.user.select();
document.myform1.user.focus();
return false;
}
if(document.myform1.emailaddress.value=="")
{
alert("Please enter your E-Mail ID");
document.myform1.emailaddress.focus();
return false;
}
if(document.myform1.emailaddress.value!="")
{
var s = document.myform1.emailaddress.value;
x=s.indexOf('@',2);
y=s.indexOf('.',3);
if(x<0 | y<0)
{
alert("Please enter a valid E-Mail ID");
document.myform1.emailaddress.select();
document.myform1.emailaddress.focus();
return false;
}
}
}

if (window.addEventListener)
window.addEventListener("load", gradientshadow.create, false)
else if (window.attachEvent)
window.attachEvent("onload", gradientshadow.create)
else if (document.getElementById)
window.onload=gradientshadow.create
