/*************************
DISCLAIMER & COPYRIGHT
This script has been created by Shivaji Basu for specific use at  
3rd Millennium Studio located at www.3rdmstudio.com
Using this script on any other site without permission and payment
is strictly prohibited and will be treated as violation of copyright law.
For further information please contact webmaster@3rdmstudio.com
*************************/
var agent = navigator.userAgent.toLowerCase();
var is_ns  = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) 
                && (agent.indexOf('compatible') == -1)));
var is_ie   = (agent.indexOf("msie") != -1);
var LocX=0
var LocY=0
var pic1="<a href='#pagetop'><img src='../graphics/3ms_top.gif' width='20' height='20' border='0' alt='Top'></a>"




if(document.layers){
block=document.arrow;
block.visibility="show";
view_height=innerHeight;
}
if(document.all && !(document.getElementById)){
block=arrow.style;
block.visibility="visible";
view_height=document.body.clientHeight;
}
if(document.getElementById && is_ns){
block=document.getElementById('arrow');
block.style.visibility="visible";
view_height=innerHeight;
}
if(document.getElementById && is_ie){
block=document.getElementById('arrow');
block.style.visibility="visible";
view_height=document.body.clientHeight;
}


function init(){
if(document.layers){
block=document.arrow;
block.visibility="show";
view_height=innerHeight;}
if(document.all && !(document.getElementById)){
block=arrow.style;
block.visibility="visible";
view_height=document.body.clientHeight;
}
if(document.getElementById && is_ns){
block=document.getElementById('arrow');
block.style.visibility="visible";
view_height=innerHeight;
}
if(document.getElementById && is_ie){
block=document.getElementById('arrow');
block.style.visibility="visible";
view_height=document.body.clientHeight;
}
createIt()
}

function createIt(){
var LocX=0;
var LocY=0;
var pic1="<a href='#pagetop'><img src='../graphics/3ms_top.gif' width='20' height='20' border='0' alt='Top'></a>";
if(document.layers){
block.document.write(pic1);
block.document.close();
}
if(document.all && !(document.getElementById)){
document.all("arrow").innerHTML=pic1;
}
if(document.getElementById){
block.innerHTML=pic1;
block.style.visibility="visible";
}
topUp()
}


function topUp(){
	if (document.layers){
	LocX=window.pageXOffset;
	LocY=window.pageYOffset;
	block.left= (LocX+8);
	block.top= (LocY+view_height-35);
	}
	if (document.all && !(document.getElementById)){
	LocX=document.body.scrollLeft;
	LocY=document.body.scrollTop;
	block.left= (LocX+9);
	block.top= (LocY+view_height-40);
	}
                  if (document.getElementById && is_ns){
                  LocX=window.pageXOffset;
	LocY=window.pageYOffset;
                  block.style.left= (LocX+8);
                  block.style.top= (LocY+view_height-35);
	}
                  if (document.getElementById && is_ie){
                  LocX=document.body.scrollLeft;
                  LocY=document.body.scrollTop;
                  block.style.left= (LocX+9);
                  block.style.top= (LocY+view_height-40);
	}
}

if(document.layers||(document.all && !(document.getElementById))||document.getElementById){
setInterval("topUp()",50)
}

window.onresize=init;

