
xsTS = 0
xsLS = 0
xsL = 42
xsT = 42
cdSXX  = 0
cdSYy = 0
cdSX = 0
cdSY = 0
filtSZ = 0
xsLSX = 0
grayV = 0
mirrorV = 0
inVertV = 0
rotationV = 0
finalEffect = 0
shadowType = 0
OpacityCount = 1

var timerID
cdSX0 = new Array(30,25,20,15,10,5,0,-5,-10,-15,-20,-25,-30)
cdSX1 = new Array(-30,-25,-20,-15,-10,-5,0,5,10,15,20,25,30)

cdSY0 = new Array(30,25,20,15,10,5,0,-5,-10,-15,-20,-25,-30)
cdSY1 = new Array(-30,-25,-20,-15,-10,-5,0,5,10,15,20,25,30)

xsLS0 = new Array(0,45,90,135,180,225,270,315)
xsLS1 = new Array(315,225,0,45,90,135,180,270) 
xsLS2 = new Array(180,225,270,315,0,45,90,135) 
xsLS3 = new Array(90,135,180,225,270,315,0,45)  
xsLS4 = new Array(0,315,270,225,180,135,90,45)  
xsLS5 = new Array(270,225,180,135,90,45,0,315)
xsLS6 = new Array(180,135,90,45,0,315,270,225)
xsLS7 = new Array(90,45,0,315,270,225,180,135)  
warn1 = "<CENTER><B>Click down on and move image to place!</B></CENTER>"
warn2 = "<CENTER><B>Click down on target to set shadow!</B></CENTER>"
warn3 = "<CENTER><B>OK! Image is set</B></CENTER>"

//======End Variables=========================================================

efct = 0
function effect(){
if (screen.width < 900) {
if(document.all.shadTitle){
if(efct == 0){
efct = 1
document.all.shadTitle.style.left = '580'
document.all.ajaxB.style.left = '580'
document.all.phnDiv.style.left = '470'

document.all.effectD.innerHTML = "Back"
} else {
efct = 0
document.all.shadTitle.style.left = '777'
document.all.ajaxB.style.left = '777'
document.all.phnDiv.style.left = '805'
document.all.effectD.innerHTML = "Effects"
}	}
}}
shdgnm = 1
function setShade(setfunk){
if(tide){
if(shadPoint){
if(setfunk== "on"){
funk = "onclick=setShade('off')"
funk0 = "visible"
shdgnm = 0
haltWarn()
}
if(setfunk== "off"){
funk = "onmousemove='pShade(this)' ; onclick=setShade('on')"
funk0 ="hidden"
shdgnm = 0
haltWarn()
warning(2,1)

}
document.all.shadGrid.outerHTML = "<DIV ID=shadGrid style='position:absolute;left:2;top:24; width:90;height:90;padding:2;background-color:red;' " + funk + "><IMG SRC='images/shadow"+ shdgnm +".gif' HEIGHT='89' WIDTH='89' unselectable=on><DIV ID=shadPoint style='position:absolute;left:42;top:42; width:10;height:10;visibility:"+ funk0 +"'><IMG SRC='images/hair.gif' HEIGHT='9' WIDTH='9'></DIV></DIV>"
document.all.shadPoint.style.left = xsL
document.all.shadPoint.style.top = xsT
}}}
function pShade(evt){
if(tide){
		xsL  = event.offsetX
		xsT  = event.offsetY
document.all.shadPoint.style.left = xsL
document.all.shadPoint.style.top = xsT
drawShadow()
adFilter()
}}
function drawShadow(){
shdgnm = 0
//======1==========================================================
if(xsL > -1 && xsL < 6 && xsT > -1 && xsT < 6)xsLS = 315,xsTS = 60,cdSX = -30 ,cdSY = -30;
if(xsL > 5 && xsL < 11 && xsT > -1 && xsT < 6)xsLS = 315,xsTS = 60,cdSX = -25,cdSY = -30;
if(xsL > 10 && xsL < 16 && xsT > -1 && xsT < 6)xsLS = 315,xsTS = 60,cdSX = -20 ,cdSY = -30;
if(xsL > 15 && xsL < 21 && xsT > -1 && xsT < 6)xsLS = 315,xsTS = 60,cdSX = -15 ,cdSY = -30;
if(xsL > 20 && xsL < 26 && xsT > -1 && xsT < 6)xsLS = 315,xsTS = 60,cdSX = -10,cdSY = -30;

if(xsL > 25 && xsL < 31 && xsT > -1 && xsT < 6)xsLS = 0,xsTS = 60,cdSX = - 5 ,cdSY = -30;
if(xsL > 30 && xsL < 44 && xsT > -1 && xsT < 6)xsLS = 0,xsTS = 60,cdSX = 0 ,cdSY = -30;
if(xsL > 43 && xsL < 56 && xsT > -1 && xsT < 6)xsLS = 0,xsTS = 60,cdSX = 0,cdSY = -30;
if(xsL > 55 && xsL < 61 && xsT > -1 && xsT < 6)xsLS = 0,xsTS = 60,cdSX = 5,cdSY = -30;

if(xsL > 60 && xsL < 66 && xsT > -1 && xsT < 6)xsLS = 45,xsTS = 60,cdSX = 10 ,cdSY = -30;
if(xsL > 65 && xsL < 71 && xsT > -1 && xsT < 6)xsLS = 45,xsTS = 60,cdSX = 15,cdSY = -30;
if(xsL > 70 && xsL < 76 && xsT > -1 && xsT < 6)xsLS = 45,xsTS = 60,cdSX = 20,cdSY = -30;
if(xsL > 75 && xsL < 81 && xsT > -1 && xsT < 6)xsLS = 45,xsTS = 60,cdSX = 25,cdSY = -30;
if(xsL > 80 && xsL < 86 && xsT > -1 && xsT < 6)xsLS = 45,xsTS = 60,cdSX = 30,cdSY = -30;
//======2==========================================================
if(xsL > -1 && xsL < 6 && xsT > 5 && xsT < 11)xsLS = 315,xsTS = 60,cdSX = -30,cdSY = -25;
if(xsL > 5 && xsL < 11 && xsT > 5 && xsT < 11)xsLS = 315,xsTS = 50,cdSX = -25,cdSY = -25;
if(xsL >10 && xsL < 16 && xsT > 5 && xsT < 11)xsLS = 315,xsTS = 50,cdSX = -20,cdSY = -25;
if(xsL > 15 && xsL < 21 && xsT > 5 && xsT < 11)xsLS = 315,xsTS = 50,cdSX = -15,cdSY = -25;
if(xsL >20 && xsL < 26 && xsT > 5 && xsT < 11)xsLS = 315,xsTS = 50,cdSX = - 10,cdSY = -25;

if(xsL > 25 && xsL < 31 && xsT > 5 && xsT < 11)xsLS = 0,xsTS = 50,cdSX = - 5,cdSY = -25;
if(xsL > 30 && xsL < 44 && xsT > 5 && xsT < 11)xsLS = 0,xsTS = 50,cdSX = 0,cdSY = -25;
if(xsL > 43 && xsL < 56 && xsT > 5 && xsT < 11)xsLS = 0,xsTS = 50,cdSX = 0,cdSY = -25;
if(xsL > 55 && xsL < 61 && xsT > 5 && xsT < 11)xsLS = 0,xsTS = 50,cdSX = 5,cdSY = -25;

if(xsL > 60 && xsL < 66 && xsT > 5 && xsT < 11)xsLS = 45,xsTS = 50,cdSX = 10,cdSY = -25;
if(xsL > 65 && xsL < 71 && xsT > 5 && xsT < 11)xsLS = 45,xsTS = 50,cdSX = 15,cdSY = -25;
if(xsL > 70 && xsL < 76 && xsT > 5 && xsT < 11)xsLS = 45,xsTS = 50,cdSX = 20,cdSY = -25;
if(xsL > 75 && xsL < 81 && xsT > 5 && xsT < 11)xsLS = 45,xsTS = 50,cdSX = 25,cdSY = -25;
if(xsL > 80 && xsL < 86 && xsT > 5 && xsT < 11)xsLS = 45,xsTS = 60,cdSX = 30,cdSY = -25;
//=======3=========================================================
if(xsL > -1 && xsL < 6 && xsT > 10 && xsT < 16)xsLS = 315,xsTS = 60,cdSX = -30,cdSY = -20;
if(xsL > 5 && xsL < 11 && xsT > 10 && xsT < 16)xsLS = 315,xsTS = 50,cdSX = -25,cdSY = -20;
if(xsL > 10 && xsL < 16 && xsT > 10 && xsT < 16)xsLS = 315,xsTS = 40,cdSX = -20,cdSY = -20;
if(xsL > 15 && xsL < 21 && xsT > 10 && xsT < 16)xsLS = 315,xsTS = 40,cdSX = -15,cdSY = -20;
if(xsL > 21 && xsL < 26 && xsT > 10 && xsT < 16)xsLS = 315,xsTS = 40,cdSX = -10,cdSY = -20;

if(xsL > 25 && xsL < 31 && xsT > 10 && xsT < 16)xsLS = 0,xsTS = 40,cdSX = -5,cdSY = -20;
if(xsL > 30 && xsL < 44 && xsT > 10 && xsT < 16)xsLS = 0,xsTS = 40,cdSX = 0,cdSY = -20;
if(xsL > 43 && xsL < 56 && xsT > 10 && xsT < 16)xsLS = 0,xsTS = 40,cdSX = 0,cdSY = -20;
if(xsL > 55 && xsL < 61 && xsT > 10 && xsT < 16)xsLS = 0,xsTS = 40,cdSX = 5,cdSY = -20;

if(xsL > 60 && xsL < 66 && xsT > 10 && xsT < 16)xsLS = 45,xsTS = 40,cdSX = 10,cdSY = -20;
if(xsL > 65 && xsL < 71 && xsT > 10 && xsT < 16)xsLS = 45,xsTS = 40,cdSX = 15,cdSY = -20;
if(xsL > 70 && xsL < 76 && xsT > 10 && xsT < 16)xsLS = 45,xsTS = 40,cdSX = 20,cdSY = -20;
if(xsL > 75 && xsL < 81 && xsT > 10 && xsT < 16)xsLS = 45,xsTS = 50,cdSX = 25,cdSY = -20;
if(xsL > 80 && xsL < 86 && xsT > 10 && xsT < 16)xsLS = 45,xsTS = 60,cdSX = 30,cdSY = -20;
//========4========================================================

if(xsL > -1 && xsL < 6 && xsT > 15 && xsT < 21)xsLS = 315,xsTS = 60,cdSX = -30,cdSY = -15;
if(xsL > 5 && xsL < 11 && xsT > 15 && xsT < 21)xsLS = 315,xsTS = 50,cdSX = -25,cdSY = -15;
if(xsL > 10 && xsL < 16 && xsT > 15 && xsT < 21)xsLS = 315,xsTS = 40,cdSX = -20,cdSY = -15;
if(xsL > 15 && xsL < 21 && xsT > 15 && xsT < 21)xsLS = 315,xsTS = 30,cdSX = -15,cdSY = -15;
if(xsL > 20 && xsL < 26 && xsT > 15 && xsT < 21)xsLS = 315,xsTS = 30,cdSX = -10,cdSY = -15;

if(xsL > 25 && xsL < 31 && xsT > 15 && xsT < 21)xsLS = 0,xsTS = 30,cdSX = -5,cdSY = -15;
if(xsL > 30 && xsL < 43 && xsT > 15 && xsT < 21)xsLS = 0,xsTS = 30,cdSX = 0,cdSY = -15;
if(xsL > 43 && xsL < 56 && xsT > 15 && xsT < 21)xsLS = 0,xsTS = 30,cdSX = 0,cdSY = -15;
if(xsL > 55 && xsL < 61 && xsT > 15 && xsT < 21)xsLS = 0,xsTS = 30,cdSX = 5,cdSY = -15;

if(xsL > 60 && xsL < 66 && xsT > 15 && xsT < 21)xsLS = 45,xsTS = 30,cdSX = 10,cdSY = -15;
if(xsL > 65 && xsL < 71 && xsT > 15 && xsT < 21)xsLS = 45,xsTS = 30,cdSX = 15,cdSY = -15;
if(xsL > 70 && xsL < 76 && xsT > 15 && xsT < 21)xsLS = 45,xsTS = 40,cdSX = 20,cdSY = -15;
if(xsL > 75 && xsL < 81 && xsT > 15 && xsT < 21)xsLS = 45,xsTS = 50,cdSX = 25,cdSY = -15;
if(xsL > 80 && xsL < 86 && xsT > 15 && xsT < 21)xsLS = 45,xsTS = 60,cdSX = 30,cdSY = -15;
//======5==========================================================

if(xsL > -1 && xsL < 6 && xsT > 20 && xsT < 26)xsLS = 315,xsTS = 60,cdSX = -30,cdSY = -10;
if(xsL > 5 && xsL < 11 && xsT > 20 && xsT < 26)xsLS = 315,xsTS = 50,cdSX = -25,cdSY = -10;
if(xsL > 10 && xsL < 16 && xsT > 20 && xsT < 26)xsLS = 315,xsTS = 40,cdSX = -20,cdSY = -10;
if(xsL > 15 && xsL < 21 && xsT > 20 && xsT < 26)xsLS = 315,xsTS = 30,cdSX = -15,cdSY = -10;
if(xsL > 20 && xsL < 26 && xsT > 20 && xsT < 26)xsLS = 315,xsTS = 20,cdSX = -10,cdSY = -10;

if(xsL > 25 && xsL < 31 && xsT > 20 && xsT < 26)xsLS = 315,xsTS = 10,cdSX = -5,cdSY = -10;
if(xsL > 30 && xsL < 43 && xsT > 20 && xsT < 26)xsLS = 0,xsTS = 10,cdSX = 0,cdSY = -10;
if(xsL > 43 && xsL < 56 && xsT > 20 && xsT < 26)xsLS = 0,xsTS = 10,cdSX = 0,cdSY = -10;
if(xsL > 55 && xsL < 61 && xsT > 20 && xsT < 26)xsLS = 45,xsTS = 10,cdSX = 5,cdSY = -10;

if(xsL > 60 && xsL < 66 && xsT > 20 && xsT < 26)xsLS = 45,xsTS = 20,cdSX = 10,cdSY = -10;
if(xsL > 65 && xsL < 71 && xsT > 20 && xsT < 26)xsLS = 45,xsTS = 30,cdSX = 15,cdSY = -10;
if(xsL > 70 && xsL < 76 && xsT > 20 && xsT < 26)xsLS = 45,xsTS = 40,cdSX = 20,cdSY = -10;
if(xsL > 75 && xsL < 81 && xsT > 20 && xsT < 26)xsLS = 45,xsTS = 50,cdSX = 25,cdSY = -10;
if(xsL > 80 && xsL < 86 && xsT > 20 && xsT < 26)xsLS = 45,xsTS = 60,cdSX = 30,cdSY = -10;

//=====m1===========================================================

if(xsL > -1 && xsL < 6 && xsT > 25 && xsT < 31)xsLS = 270,xsTS = 60,cdSX = -30,cdSY =40;
if(xsL > 5 && xsL < 11 && xsT > 25 && xsT < 31)xsLS = 270,xsTS = 50,cdSX = -25,cdSY = -5;
if(xsL > 10 && xsL < 16 && xsT > 25 && xsT < 31)xsLS = 270,xsTS = 40,cdSX = -20,cdSY = -5;
if(xsL > 15 && xsL < 21 && xsT > 25 && xsT < 31)xsLS = 270,xsTS = 30,cdSX = -15,cdSY = -5;
if(xsL > 20 && xsL < 26 && xsT > 25 && xsT < 31)xsLS = 270,xsTS = 20,cdSX = -10,cdSY = -5;

if(xsL > 25 && xsL < 31 && xsT > 25 && xsT < 31)xsLS = 270,xsTS = 10,cdSX = -5,cdSY = -5;
if(xsL > 30 && xsL < 43 && xsT > 25 && xsT < 31)xsLS = 0,xsTS = 10,cdSX = 0,cdSY = -5;
if(xsL > 43 && xsL < 56 && xsT > 25 && xsT < 31)xsLS = 0,xsTS = 10,cdSX = 0,cdSY = -5;
if(xsL > 55 && xsL < 61 && xsT > 25 && xsT < 31)xsLS = 90,xsTS = 10,cdSX = 5,cdSY = -5;

if(xsL > 60 && xsL < 66 && xsT > 25 && xsT < 31)xsLS = 90,xsTS = 20,cdSX = 10,cdSY = -5;
if(xsL > 65 && xsL < 71 && xsT > 25 && xsT < 31)xsLS = 90,xsTS = 30,cdSX = 15,cdSY = -5;
if(xsL > 70 && xsL < 76 && xsT > 25 && xsT < 31)xsLS = 90,xsTS = 40,cdSX = 20,cdSY = -5;
if(xsL > 75 && xsL < 81 && xsT > 25 && xsT < 31)xsLS = 90,xsTS = 50,cdSX = 25,cdSY = -5;
if(xsL > 80 && xsL < 86 && xsT > 25 && xsT < 31)xsLS = 90,xsTS = 60,cdSX = 30,cdSY = -5;

//=====m2===========================================================

if(xsL > -1 && xsL < 6 && xsT > 30 && xsT < 43)xsLS = 270,xsTS = 60,cdSX = -30,cdSY = 0;
if(xsL > 5 && xsL < 11 && xsT > 30 && xsT < 43)xsLS = 270,xsTS = 50,cdSX = -25,cdSY = 0;
if(xsL > 10 && xsL < 16 && xsT > 30 && xsT < 43)xsLS = 270,xsTS = 40,cdSX = -20,cdSY = 0;
if(xsL > 15 && xsL < 21 && xsT > 30 && xsT < 43)xsLS = 270,xsTS = 30,cdSX = -15,cdSY = 0;
if(xsL > 20 && xsL < 26 && xsT > 30 && xsT < 43)xsLS = 270,xsTS = 20,cdSX = -10,cdSY = 0;

if(xsL > 25 && xsL < 31 && xsT > 30 && xsT < 43)xsLS = 270,xsTS = 10,cdSX = -5,cdSY = 0;
if(xsL > 30 && xsL < 43 && xsT > 30 && xsT < 43)xsLS = 0,xsTS = 10,cdSX = 0,cdSY = 0;
if(xsL > 43 && xsL < 56 && xsT > 30 && xsT < 43)xsLS = 0,xsTS = 10,cdSX = 0,cdSY = 0;
if(xsL > 55 && xsL < 61 && xsT > 30 && xsT < 43)xsLS = 90,xsTS = 10,cdSX = 5,cdSY = 0;

if(xsL > 60 && xsL < 66 && xsT > 30 && xsT < 43)xsLS = 90,xsTS = 20,cdSX = 10,cdSY = 0;
if(xsL > 65 && xsL < 71 && xsT > 30 && xsT < 43)xsLS = 90,xsTS = 30,cdSX = 15,cdSY = 0;
if(xsL > 70 && xsL < 76 && xsT > 30 && xsT < 43)xsLS = 90,xsTS = 40,cdSX = 20,cdSY = 0;
if(xsL > 75 && xsL < 81 && xsT > 30 && xsT < 43)xsLS = 90,xsTS = 50,cdSX = 25,cdSY = 0;
if(xsL > 80 && xsL < 86 && xsT > 30 && xsT < 43)xsLS = 90,xsTS = 60,cdSX = 30,cdSY = 0;

//=====m3===========================================================

if(xsL > -1 && xsL < 6 && xsT > 43 && xsT < 56)xsLS = 270,xsTS = 60,cdSX = -30,cdSY = 0;
if(xsL > 5 && xsL < 11 && xsT > 43 && xsT < 56)xsLS = 270,xsTS = 50,cdSX = -25,cdSY = 0;
if(xsL > 10 && xsL < 16 && xsT > 43 && xsT < 56)xsLS = 270,xsTS = 40,cdSX = -20,cdSY = 0;
if(xsL > 15 && xsL < 21 && xsT > 43 && xsT < 56)xsLS = 270,xsTS = 30,cdSX = -15,cdSY = 0;
if(xsL > 20 && xsL < 26 && xsT > 43 && xsT < 56)xsLS = 270,xsTS = 20,cdSX = -10,cdSY = 0;

if(xsL > 25 && xsL < 31 && xsT > 43 && xsT < 56)xsLS = 270,xsTS = 10,cdSX = -5,cdSY = 0;
if(xsL > 30 && xsL < 43 && xsT > 43 && xsT < 56)xsLS = 180,xsTS = 10,cdSX = 0,cdSY = 0;
if(xsL > 43 && xsL < 56 && xsT > 43 && xsT < 56)xsLS = 180,xsTS = 10,cdSX = 0,cdSY = 0;
if(xsL > 55 && xsL < 61 && xsT > 43 && xsT < 56)xsLS = 90,xsTS = 10,cdSX = 5,cdSY = 0;

if(xsL > 60 && xsL < 66 && xsT > 43 && xsT < 56)xsLS = 90,xsTS = 20,cdSX = 10,cdSY = 0;
if(xsL > 65 && xsL < 71 && xsT > 43 && xsT < 56)xsLS = 90,xsTS = 30,cdSX = 15,cdSY = 0;
if(xsL > 70 && xsL < 76 && xsT > 43 && xsT < 56)xsLS = 90,xsTS = 40,cdSX = 20,cdSY = 0;
if(xsL > 75 && xsL < 81 && xsT > 43 && xsT < 56)xsLS = 90,xsTS = 50,cdSX = 25,cdSY = 0;
if(xsL > 80 && xsL < 86 && xsT > 43 && xsT < 56)xsLS = 90,xsTS = 60,cdSX = 30,cdSY = 0;

//====m4============================================================

if(xsL > -1 && xsL < 6 && xsT > 55 && xsT < 61)xsLS = 225,xsTS = 60,cdSX = -30,cdSY = 5;
if(xsL > 5 && xsL < 11 && xsT > 55 && xsT < 61)xsLS = 225,xsTS = 50,cdSX = -25,cdSY = 5;
if(xsL > 10 && xsL < 16 && xsT > 55 && xsT < 61)xsLS = 225,xsTS = 40,cdSX = -20,cdSY = 5;
if(xsL > 15 && xsL < 21 && xsT > 55 && xsT < 61)xsLS = 225,xsTS = 30,cdSX = -15,cdSY = 5;
if(xsL > 20 && xsL < 26 && xsT > 55 && xsT < 61)xsLS = 225,xsTS = 20,cdSX = -10,cdSY = 5;

if(xsL > 25 && xsL < 31 && xsT > 55 && xsT < 61)xsLS = 225,xsTS = 10,cdSX = -5,cdSY = 5;
if(xsL > 30 && xsL < 43 && xsT > 55 && xsT < 61)xsLS = 180,xsTS = 10,cdSX = 0,cdSY = 5;
if(xsL > 43 && xsL < 56 && xsT > 55 && xsT < 61)xsLS = 180,xsTS = 10,cdSX = 0,cdSY = 5;
if(xsL > 55 && xsL < 61 && xsT > 55 && xsT < 61)xsLS = 135,xsTS = 10,cdSX = 5,cdSY = 5;

if(xsL > 60 && xsL < 66 && xsT > 55 && xsT < 61)xsLS = 135,xsTS = 20,cdSX = 10,cdSY = 5;
if(xsL > 65 && xsL < 71 && xsT > 55 && xsT < 61)xsLS = 135,xsTS = 30,cdSX = 15,cdSY = 5;
if(xsL > 70 && xsL < 76 && xsT > 55 && xsT < 61)xsLS = 135,xsTS = 40,cdSX = 20,cdSY = 5;
if(xsL > 75 && xsL < 81 && xsT > 55 && xsT < 61)xsLS = 135,xsTS = 50,cdSX = 25,cdSY = 5;
if(xsL > 80 && xsL < 86 && xsT > 55 && xsT < 61)xsLS = 135,xsTS = 60,cdSX = 30,cdSY = 5;

//=====1===========================================================

if(xsL > -1 && xsL < 6 && xsT > 60 && xsT < 66)xsLS = 225,xsTS = 60,cdSX = -30,cdSY = 10;
if(xsL > 5 && xsL < 11 && xsT > 60 && xsT < 66)xsLS = 225,xsTS = 50,cdSX = -25,cdSY = 10;
if(xsL > 10 && xsL < 16 && xsT > 60 && xsT < 66)xsLS = 225,xsTS = 40,cdSX = -20,cdSY = 10;
if(xsL > 15 && xsL < 21 && xsT > 60 && xsT < 66)xsLS = 225,xsTS = 30,cdSX = -15,cdSY = 10;
if(xsL > 20 && xsL < 26 && xsT > 60 && xsT < 66)xsLS = 225,xsTS = 20,cdSX = -10,cdSY = 10;

if(xsL > 25 && xsL < 31 && xsT > 60 && xsT < 66)xsLS = 225,xsTS = 20,cdSX = -5,cdSY = 10;
if(xsL > 30 && xsL < 43 && xsT > 60 && xsT < 66)xsLS = 180,xsTS = 20,cdSX = 0,cdSY = 10;
if(xsL > 43 && xsL < 56 && xsT > 60 && xsT < 66)xsLS = 180,xsTS = 20,cdSX = 0,cdSY = 10;
if(xsL > 55 && xsL < 61 && xsT > 60 && xsT < 66)xsLS = 135,xsTS = 20,cdSX = 5,cdSY = 10;

if(xsL > 60 && xsL < 66 && xsT > 60 && xsT < 66)xsLS = 135,xsTS = 20,cdSX = 10,cdSY = 10;
if(xsL > 65 && xsL < 71 && xsT > 60 && xsT < 66)xsLS = 135,xsTS = 30,cdSX = 15,cdSY = 10;
if(xsL > 70 && xsL < 76 && xsT > 60 && xsT < 66)xsLS = 135,xsTS = 40,cdSX = 20,cdSY = 10;
if(xsL > 75 && xsL < 81 && xsT > 60 && xsT < 66)xsLS = 135,xsTS = 50,cdSX = 25,cdSY = 10;
if(xsL > 80 && xsL < 86 && xsT > 60 && xsT < 66)xsLS = 135,xsTS = 60,cdSX = 30,cdSY = 10;

//=====2===========================================================

if(xsL > -1 && xsL < 6 && xsT > 65 && xsT < 71)xsLS = 225,xsTS = 60,cdSX = -30,cdSY = 15;
if(xsL > 5 && xsL < 11 && xsT > 65 && xsT < 71)xsLS = 225,xsTS = 50,cdSX = -25,cdSY = 15;
if(xsL > 10 && xsL < 16 && xsT > 65 && xsT < 71)xsLS = 225,xsTS = 40,cdSX = -20,cdSY = 15;
if(xsL > 15 && xsL < 21 && xsT > 65 && xsT < 71)xsLS = 225,xsTS = 30,cdSX = -15,cdSY = 15;
if(xsL > 20 && xsL < 26 && xsT > 65 && xsT < 71)xsLS = 225,xsTS = 30,cdSX = -10,cdSY = 15;

if(xsL > 25 && xsL < 31 && xsT > 65 && xsT < 71)xsLS = 180,xsTS = 30,cdSX = 5,cdSY = 15;
if(xsL > 30 && xsL < 43 && xsT > 65 && xsT < 71)xsLS = 180,xsTS = 30,cdSX = 0,cdSY = 15;
if(xsL > 43 && xsL < 56 && xsT > 65 && xsT < 71)xsLS = 180,xsTS = 30,cdSX = 0,cdSY = 15;
if(xsL > 55 && xsL < 61 && xsT > 65 && xsT < 71)xsLS = 180,xsTS = 30,cdSX = 5,cdSY = 15;

if(xsL > 60 && xsL < 66 && xsT > 65 && xsT < 71)xsLS = 135,xsTS = 30,cdSX = 10,cdSY = 15;
if(xsL > 65 && xsL < 71 && xsT > 65 && xsT < 71)xsLS = 135,xsTS = 30,cdSX = 15,cdSY = 15;
if(xsL > 70 && xsL < 76 && xsT > 65 && xsT < 71)xsLS = 135,xsTS = 40,cdSX = 20,cdSY = 15;
if(xsL > 75 && xsL < 81 && xsT > 65 && xsT < 71)xsLS = 135,xsTS = 50,cdSX = 25,cdSY = 15;
if(xsL > 80 && xsL < 86 && xsT > 65 && xsT < 71)xsLS = 135,xsTS = 60,cdSX = 30,cdSY = 15;

//=====3===========================================================

if(xsL > -1 && xsL < 6 && xsT > 70 && xsT < 76)xsLS = 225,xsTS = 60,cdSX = -30,cdSY = 20;
if(xsL > 5 && xsL < 11 && xsT > 70 && xsT < 76)xsLS = 225,xsTS = 50,cdSX = -25,cdSY = 20;
if(xsL > 10 && xsL < 16 && xsT > 70 && xsT < 76)xsLS = 225,xsTS = 40,cdSX = -20,cdSY = 20;
if(xsL > 15 && xsL < 21 && xsT > 70 && xsT < 76)xsLS = 225,xsTS = 40,cdSX = -15,cdSY = 20;
if(xsL > 20 && xsL < 26 && xsT > 70 && xsT < 76)xsLS = 225,xsTS = 40,cdSX = -10,cdSY = 20;

if(xsL > 25 && xsL < 31 && xsT > 70 && xsT < 76)xsLS = 180,xsTS = 40,cdSX = -5,cdSY = 20;
if(xsL > 30 && xsL < 43 && xsT > 70 && xsT < 76)xsLS = 180,xsTS = 40,cdSX = 0,cdSY = 20;
if(xsL > 43 && xsL < 56 && xsT > 70 && xsT < 76)xsLS = 180,xsTS = 40,cdSX = 0,cdSY = 20;
if(xsL > 55 && xsL < 61 && xsT > 70 && xsT < 76)xsLS = 180,xsTS = 40,cdSX = 5,cdSY = 20;

if(xsL > 60 && xsL < 66 && xsT > 70 && xsT < 76)xsLS = 135,xsTS = 40,cdSX = 10,cdSY = 20;
if(xsL > 65 && xsL < 71 && xsT > 70 && xsT < 76)xsLS = 135,xsTS = 40,cdSX = 15,cdSY = 20;
if(xsL > 70 && xsL < 76 && xsT > 70 && xsT < 76)xsLS = 135,xsTS = 40,cdSX = 20,cdSY = 20;
if(xsL > 75 && xsL < 81 && xsT > 70 && xsT < 76)xsLS = 135,xsTS = 50,cdSX = 25,cdSY = 20;
if(xsL > 80 && xsL < 86 && xsT > 70 && xsT < 76)xsLS = 135,xsTS = 60,cdSX = 30,cdSY = 20;

//======4==========================================================

if(xsL > -1 && xsL < 6 && xsT > 75 && xsT < 81)xsLS = 225,xsTS = 60,cdSX = -30,cdSY = 25;
if(xsL > 5 && xsL < 11 && xsT > 75 && xsT < 81)xsLS = 225,xsTS = 50,cdSX = -25,cdSY = 25;
if(xsL > 10 && xsL < 16 && xsT > 75 && xsT < 81)xsLS = 225,xsTS = 50,cdSX = -20,cdSY = 25;
if(xsL > 15 && xsL < 21 && xsT > 75 && xsT < 81)xsLS = 225,xsTS = 50,cdSX = -15,cdSY = 25;
if(xsL > 20 && xsL < 26 && xsT > 75 && xsT < 81)xsLS = 225,xsTS = 50,cdSX = -10,cdSY = 25;

if(xsL > 25 && xsL < 31 && xsT > 75 && xsT < 81)xsLS = 180,xsTS = 50,cdSX = -5,cdSY = 25;
if(xsL > 30 && xsL < 43 && xsT > 75 && xsT < 81)xsLS = 180,xsTS = 50,cdSX = 0,cdSY = 25;
if(xsL > 43 && xsL < 56 && xsT > 75 && xsT < 81)xsLS = 180,xsTS = 50,cdSX = 0,cdSY = 25;
if(xsL > 55 && xsL < 61 && xsT > 75 && xsT < 81)xsLS = 180,xsTS = 50,cdSX = 5,cdSY = 25;

if(xsL > 60 && xsL < 66 && xsT > 75 && xsT < 81)xsLS = 135,xsTS = 50,cdSX = 10,cdSY = 25;
if(xsL > 65 && xsL < 71 && xsT > 75 && xsT < 81)xsLS = 135,xsTS = 50,cdSX = 15,cdSY = 25;
if(xsL > 70 && xsL < 76 && xsT > 75 && xsT < 81)xsLS = 135,xsTS = 50,cdSX = 20,cdSY = 25;
if(xsL > 75 && xsL < 81 && xsT > 75 && xsT < 81)xsLS = 135,xsTS = 50,cdSX = 25,cdSY = 25;
if(xsL > 80 && xsL < 86 && xsT > 75 && xsT < 81)xsLS = 135,xsTS = 60,cdSX = 30,cdSY = 25;

//=======5=========================================================

if(xsL > -1 && xsL < 6 && xsT > 80 && xsT < 86)xsLS = 225,xsTS = 60,cdSX = -30,cdSY = 30;
if(xsL > 5 && xsL < 11 && xsT > 80 && xsT < 86)xsLS = 225,xsTS = 60,cdSX = -25,cdSY = 30;
if(xsL > 10 && xsL < 16 && xsT > 80 && xsT < 86)xsLS = 225,xsTS = 60,cdSX = -20,cdSY = 30;
if(xsL > 15 && xsL < 21 && xsT > 80 && xsT < 86)xsLS = 225,xsTS = 60,cdSX = -15,cdSY = 30;
if(xsL > 20 && xsL < 26 && xsT > 80 && xsT < 86)xsLS = 225,xsTS = 60,cdSX = -10,cdSY = 30;

if(xsL > 25 && xsL < 31 && xsT > 80 && xsT < 86)xsLS = 180,xsTS = 60,cdSX = -5,cdSY = 30;
if(xsL > 30 && xsL < 43 && xsT > 80 && xsT < 86)xsLS = 180,xsTS = 60,cdSX = 0,cdSY = 30;
if(xsL > 43 && xsL < 56 && xsT > 80 && xsT < 86)xsLS = 180,xsTS = 60,cdSX = 0,cdSY = 30;
if(xsL > 55 && xsL < 61 && xsT > 80 && xsT < 86)xsLS = 180,xsTS = 60,cdSX = 5,cdSY = 30;

if(xsL > 60 && xsL < 66 && xsT > 80 && xsT < 86)xsLS = 135,xsTS = 60,cdSX = 10,cdSY = 30;
if(xsL > 65 && xsL < 71 && xsT > 80 && xsT < 86)xsLS = 135,xsTS = 60,cdSX = 15,cdSY = 30;
if(xsL > 70 && xsL < 76 && xsT > 80 && xsT < 86)xsLS = 135,xsTS = 60,cdSX = 20,cdSY = 30;
if(xsL > 75 && xsL < 81 && xsT > 80 && xsT < 86)xsLS = 135,xsTS = 60,cdSX = 25,cdSY = 30;
if(xsL > 80 && xsL < 86 && xsT > 80 && xsT < 86)xsLS = 135,xsTS = 60,cdSX = 30,cdSY = 30;

if(xsL > 30 && xsL < 51 && xsT > 30 && xsT < 51)xsLS = 0,xsTS = 0,cdSX = 0,cdSY = 0,shdgnm = 1;

xsLSX = xsLS
cdSXX  = cdSX
cdSYy = cdSY
	for (var i = 0; i < xsLS0.length; i++) { 
		if (xsLS == xsLS0[i]) { 
			break 
		} 
	} 
	for (var j = 0; j < cdSX0.length; j++) { 
		if (cdSX == cdSX0[j]) { 
			break 
		} 
	} 
	for (var l = 0; l < cdSY0.length; l++) { 
		if (cdSY == cdSY0[l]) { 
			break 
		} 
	} 
	if (l < cdSY0.length) { 
if(rotationV == 1){
xsLSX = xsLS1[i]
cdSXX  = cdSY0[l]
cdSYy = cdSX1[j]
}
if(rotationV == 2){
xsLSX = xsLS2[i]
cdSXX  = cdSX1[j]
cdSYy = cdSY1[l]
}
if(rotationV == 3){
xsLSX = xsLS3[i]
cdSXX  = cdSY1[l]
cdSYy = cdSX0[j]
}
if(mirrorV == 1){
xsLSX = xsLS4[i]
cdSXX  = cdSX1[j]
cdSYy = cdSY0[l] 
}
if(rotationV == 1 && mirrorV == 1){
xsLSX = xsLS5[i] 
cdSXX  = cdSY0[l]
cdSYy = cdSX0[j]
}
if(rotationV == 2 && mirrorV == 1){
xsLSX = xsLS6[i]
cdSXX  = cdSX0[j]
cdSYy = cdSY1[l] 
}
if(rotationV == 3 && mirrorV == 1){
xsLSX = xsLS7[i]
cdSXX  = cdSY1[l] 
cdSYy = cdSX1[j]
}
	} 
}
shadColor = 'black'
function palletChg(pallet, shcolor){
if(tide){
shadColor = shcolor
document.all.shadPallet.style.backgroundColor = shadColor
adFilter()
}}
var OpacityY = 0
var OpacitySen = 0
var OpacityzA = 0
var OpacityzB = 0
var Opacityn = 0
var OpacityP = 0
var OpacitysetX = 0
var OpacitysetY = 0
var Opacitymin = 0
var Opacitymax = 0
function OpacityCoords() {
		OpacityY = window.event.clientX + window.document.body.scrollLeft
	 	OpacityX = window.event.clientY + window.document.body.scrollTop
	if (OpacitySen == 1){ 
		OpacityP = parseFloat(document.getElementById(OpacityFnc).style.left)
		OpacityzB = OpacityzA
		OpacityzA = OpacityY 		
		OpacitysetY = OpacityzB - OpacityP
		OpacitysetX = OpacityY - OpacitysetY
		Opacityn = OpacityY - OpacityzB
		if (Opacityn > 1) Opacityn = 1;
		if (Opacityn < -1) Opacityn = -1;
		if (OpacitysetX < Opacitymin){
			OpacitysetX = Opacitymin
			}
		if (OpacitysetX > Opacitymax){
			OpacitysetX = Opacitymax
		}
	if (OpacitysetX <= Opacitymax && OpacitysetX >= Opacitymin){
			document.getElementById(OpacityFnc).style.left = OpacitysetX	
	}
	OpacityCount = 100- ((((OpacitysetX - Opacitymin) / (Opacitymax - Opacitymin)) *90))
if(OpacityCount == "100"){
OpacityCount = 1
} else {OpacityCount = "." + parseInt(OpacityCount );};
document.all.OpacityTit.innerHTML ="Image Opacity " + OpacityCount
adFilter()
		}
	return true
}
function OpacityCnt(slider, state, min, max){
if(tide){
	OpacityFnc = slider
	OpacitySen = state
	Opacitymin = min
	Opacitymax = max
	if (OpacitySen == 0){
document.onmousemove = OpacityCoords
		OpacitySen = 1
		OpacityzA = OpacityY 
	} else {
		OpacitySen = 0
	}
}}
function choose_color(t) {
if(tide){
shadColor ='#' + (0x1000000 + dlgHelper.ChooseColorDlg()).toString(16).substr(1);
document.all.shadPallet.style.backgroundColor = shadColor
adFilter()
}}
function chooseLcolor(t) {
if(tide){
x = stipTide()
box[x][5] ='#' + (0x1000000 + dlgHelper.ChooseColorDlg()).toString(16).substr(1);
document.all.lbCol.style.backgroundColor = box[x][5]
document.all("box" + x + "IA").style.color = box[x][5]
}}
function filt0(){
if(tide){
if(inVertV == 0){
inVertV = 1
document.all.inVertD.style.color = "gold"
} else {
inVertV = 0
document.all.inVertD.style.color = "white"
}
adFilter()
}}
function filt1(){
if(tide){
if(mirrorV == 0){
mirrorV = 1
document.all.mirrorD.style.color = "gold"
} else {
mirrorV = 0
document.all.mirrorD.style.color = "white"
}
adFilter()
}}
function filt2(){
if(tide){
if(grayV == 0){
grayV = 1
document.all.grayD.style.color = "gold"
} else {
grayV = 0
document.all.grayD.style.color = "white"
}
adFilter()
}}
function filt3(){
if(tide){
rotationV = rotationV*1+1
document.all.rotationD.style.color = "gold"
if(rotationV == 4){
rotationV = 0
document.all.rotationD.style.color = "white"
}
adFilter()
}}
function filt4(g){
if(tide){
if(g == 0){
shadowType = 0
document.all.dropD.style.color = "white"
document.all.fusionD.style.color = "gold"
} else {
shadowType = 1
document.all.dropD.style.color = "gold"
document.all.fusionD.style.color = "white"
}
adFilter()
}}
function stipTide(){
if(tide.length == 5)tideNo = tide.slice(3,-1);
if(tide.length == 6)tideNo = tide.slice(3,-1);
if(tide.length == 7)tideNo = tide.slice(4,-1);
return tideNo
}
function stipTide2(){
if(tide){
if(tide.length == 5)tideNm = tide.slice(0,-2);
if(tide.length == 6)tideNm = tide.slice(0,-3);
if(tide.length == 7)tideNm = tide.slice(0,-3);
return tideNm
}}
function setFilter(){
x = stipTide()
document.all("topCount").value = stipTide()

grayV = box[x][25]
mirrorV = box[x][26]
inVertV = box[x][27] 
rotationV = box[x][28]
OpacityCount = box[x][29]
xsL = box[x][30]
xsT = box[x][31]
OpacityP = box[x][32]
shadColor = box[x][33]
shadowType = box[x][34]
finalEffect = box[x][35]
drawShadow()
if(shadowType == 0){
document.all.fusionD.style.color = "gold"
document.all.dropD.style.color = "white"
} else {
document.all.dropD.style.color = "gold"
document.all.fusionD.style.color = "white"
}
if(inVertV == 0){
document.all.inVertD.style.color = "white"
} else {
document.all.inVertD.style.color = "gold"
}
if(mirrorV == 0){
document.all.mirrorD.style.color = "white"
} else {
document.all.mirrorD.style.color = "gold"
}
if(grayV == 0){
document.all.grayD.style.color = "white"
} else {
document.all.grayD.style.color = "gold"
}
if(rotationV == 0){
document.all.rotationD.style.color = "white"
} else {
document.all.rotationD.style.color = "gold"
}

if(stipTide2() == "box"){
c = box[x][11]
if(c == "white")document.all.mainCl.src = "images/b-w-on.gif"; 
if(c == "colored")document.all.mainCl.src = "images/color-on.gif"; 

}


document.all.shadPallet.style.backgroundColor = shadColor
document.all.shadPoint.style.left = xsL
document.all.shadPoint.style.top = xsT
funk = "onclick=setShade('off')"
funk0 = "visible"
document.all.shadGrid.outerHTML = "<DIV ID=shadGrid style='position:absolute;left:2;top:24; width:90;height:90;padding:2;background-color:red;' " + funk + "><IMG SRC='images/shadow"+ shdgnm +".gif' HEIGHT='89' WIDTH='89' unselectable=on><DIV ID=shadPoint style='position:absolute;left:"+ xsL +";top:"+ xsT +"; width:10;height:10;visibility:"+ funk0 +"'><IMG SRC='images/hair.gif' HEIGHT='9' WIDTH='9'></DIV></DIV>"
filtSZU = "progid:DXImageTransform.Microsoft.BasicImage(grayscale="+ grayV +", xray=0, mirror="+ mirrorV +", invert="+ inVertV +", opacity="+ OpacityCount +", rotation="+ rotationV +")"
filtSZ = "progid:DXImageTransform.Microsoft.shadow(color=" + shadColor + ",STRENGTH="+ xsTS +", DIRECTION="+ xsLSX +")"
document.all.OpacityBar.style.left = OpacityP;
}
AIfilter = "off"
function adFilter(){
if(AIfilter == 'on'){adFilter0()}
else {adFilter1()}

}
function adFilter0(){
x = stipTide()
if(shadowType == 0){
filtSZ = "progid:DXImageTransform.Microsoft.shadow(color=" + shadColor + ",STRENGTH="+ xsTS +", DIRECTION="+ xsLSX +")"
} else {
filtSZ = "progid:DXImageTransform.Microsoft.dropshadow(OffX="+ cdSXX +", OffY="+ cdSYy +", color=" + shadColor + ", Positive=true)"
}
box[x][9] = filtSZ
document.all(stipTide2() + x + "IA").style.filter = filtSZ
}
function adFilter1(){
x = stipTide()
box[x][25] = grayV
box[x][26] = mirrorV
box[x][27] = inVertV
box[x][28] = rotationV
box[x][29] = OpacityCount
box[x][30] = xsL
box[x][31] = xsT
box[x][32] = OpacityP
box[x][33] = shadColor
box[x][34] = shadowType
drawShadow()
if(shadowType == 0){
filtSZ = "progid:DXImageTransform.Microsoft.shadow(color=" + shadColor + ",STRENGTH="+ xsTS +", DIRECTION="+ xsLSX +")"
} else {
filtSZ = "progid:DXImageTransform.Microsoft.dropshadow(OffX="+ cdSXX +", OffY="+ cdSYy +", color=" + shadColor + ", Positive=true)"
}
filtSZU = "progid:DXImageTransform.Microsoft.BasicImage(grayscale="+ grayV +", xray=0, mirror="+ mirrorV +", invert="+ inVertV +", opacity="+ OpacityCount +", rotation="+ rotationV +")"
finalEffect = filtSZ + filtSZU
box[x][35] = finalEffect
document.all(stipTide2() + x + "I").style.filter = filtSZ + filtSZU
}
function clearFilter(){
filtSZ = ""
filtSZU = ""
xsTS = 0
xsLS = 0
xsL = 0
xsT = 0
cdSXX  = 0
cdSYy = 0
cdSX = 0
cdSY = 0
filtSZ = 0
xsLSX = 0
finalEffect = 0
grayV = 0
mirrorV = 0
inVertV = 0
rotationV = 0
OpacityCount = 1
xsL = 0
xsT = 0
OpacityP = 0
shadColor = "black"
shadowType = 0
document.all.inVertD.style.color = "white"
document.all.mirrorD.style.color = "white"
document.all.rotationD.style.color = "white"
document.all.grayD.style.color = "white"
document.all.dropD.style.color = "white"
document.all.fusionD.style.color = "gold"
document.all.shadPallet.style.backgroundColor = shadColor
document.all.shadPoint.style.left = xsL
document.all.shadPoint.style.top = xsT
funk = "onclick=setShade('off')"
funk0 = "visible"
document.all.shadGrid.outerHTML = "<DIV ID=shadGrid style='position:absolute;left:2;top:24; width:90;height:90;padding:2;background-color:red;' " + funk + "><IMG SRC='images/shadow1.gif' HEIGHT='89' WIDTH='89' unselectable=on><DIV ID=shadPoint style='position:absolute;left:42;top:42; width:10;height:10;visibility:"+ funk0 +"'><IMG SRC='images/hair.gif' HEIGHT='9' WIDTH='9'></DIV></DIV>"
filtSZU = "progid:DXImageTransform.Microsoft.BasicImage(grayscale="+ grayV +", xray=0, mirror="+ mirrorV +", invert="+ inVertV +", opacity="+ OpacityCount +", rotation="+ rotationV +")"
filtSZ = "progid:DXImageTransform.Microsoft.shadow(color=" + shadColor + ",STRENGTH="+ xsTS +", DIRECTION="+ xsLSX +")"
document.all.OpacityBar.style.left = 0;
setFilter()
}

function warning(wx,v){
haltWarn()
if(v == 0) vb= "hidden";
if(v > 0) vb= "visible";
if(wx == 0) warn=warn0;
if(wx == 1) warn=warn1,warningx();
if(wx == 2) warn=warn2,warningx1();
if(wx == 3) warn=warn3,haltWarn();
document.all.mainW.style.visibility = vb
document.all.mainW.innerHTML = warn
document.all.mainW.style.backgroundColor = "yellow"

}
var flash = false
function warningx() {
	colr = ((flash) ? "transparent" : "yellow")
	colrT = ((flash) ? "white" : "black")
	flash = !flash
	document.all.mainW.style.backgroundColor = colr
	document.all.mainW.style.color = colrT
timerID = setTimeout("warningx()",2000)

}
function warningx1() {
	colr = ((flash) ? "transparent" : "yellow")
	colrT = ((flash) ? "white" : "black")
	flash = !flash
	document.all.mainW.style.backgroundColor = colr
	document.all.shadGrid.style.backgroundColor = colr
	document.all.mainW.style.color = colrT
timerID = setTimeout("warningx1()",2000)
}
function haltWarn() {
	clearTimeout(timerID)
timerID = false
	document.all.mainW.style.visibility = "hidden"
	document.all.shadGrid.style.backgroundColor = "red"

}