//copyright Thomas E Loucks and coolplays corporation 2005 all rights reserved
var zTpAY = 0
var zApY = 0
var zAjust = 0
var zTpAA = 0
var zTpAB = 0
var azApx =0
var y = 0
var topPos = 0
var zAOffY = 0
var zAOffs = 0
var zAMin = 0
var zKPos = 0
var zAMax = 0
var cVpY
var sSet = 10
fXe= ""
function getMouseXY(e) {

 		zTpAX = window.event.clientX + window.document.body.scrollLeft
	 	zTpAY = window.event.clientY + window.document.body.scrollTop
	if (zTpAX <= 0) {zTpAX = 0} 
	if (zTpAY <= 0) {zTpAY = 0}   
	posX = zTpAX
	zApY = zTpAY
		if (zAjust == 1){ 
		topPos = parseFloat(document.getElementById(cVpY).style.top)
		zTpAB = zTpAA
		zTpAA = zApY 		
		zAOffs = zTpAB - topPos
		zAOffY = zApY - zAOffs
		y = zApY - zTpAB
		if (y > 1) y = 1;
		if (y < -1) y = -1;
		if (zAOffY < zAMin){zAOffY = zAMin}
		if (zAOffY > zAMax){zAOffY = zAMax}

	if (zAOffY <= zAMax && zAOffY >= zAMin){document.getElementById(cVpY).style.top = zAOffY;}
 x = stipTide()
if(stipTide2() == "text"){
if(cVpY == "sNam1"){
tTop1 = 10 + ((((zAOffY - zAMin) / (zAMax - zAMin)) *850))
posTop = parseInt(tTop1)
box[x][2] = posTop
document.all("text"+ x +"I").style.top = posTop
box[x][14] = topPos
	}
if(cVpY == "sNam2"){
	tLeft1 = 525 - ((((zAOffY - zAMin) / (zAMax - zAMin)) *500))
posLeft = tLeft1
box[x][1] = posLeft
document.all("text"+ x +"I").style.left = posLeft
box[x][15] = topPos
	}
if(cVpY == "sNam3"){
	tWidth1 = 690 - ((((zAOffY - zAMin) / (zAMax - zAMin)) *400))
txtWidth = tWidth1
box[x][3] = txtWidth
document.all("text"+ x +"I").style.width = txtWidth
box[x][16] = topPos
	}
if(cVpY == "sNam4"){
tHight1 = 30 + ((((zAOffY - zAMin) / (zAMax - zAMin)) *500))
posHght = parseInt(tHight1)
box[x][4] = posHght
document.all("text"+ x +"I").style.height = posHght
box[x][17] = topPos
	}
if(cVpY == "sNam5"){
tFtSize1 = 99 - ((((zAOffY - zAMin) / (zAMax - zAMin)) *89))
fntSiz = parseInt(tFtSize1)
box[x][6] = fntSiz
document.all("text"+ x +"I").style.fontSize = fntSiz +"pt"
document.all.sNam5.innerHTML = fntSiz
box[x][18] = topPos
	}
if(cVpY == "sNam6"){
	tTbord1 = 5 - ((((zAOffY - zAMin) / (zAMax - zAMin)) *5))
fntBrd = parseInt(tTbord1)
brdCnt1 = fntBrd +"pt solid"
document.all("text"+ x +"I").style.border = fntBrd +"pt solid"
document.all.sNam6.innerHTML = fntBrd
document.all("text"+ x +"I").style.borderColor = box[x][13]
box[x][12] = brdCnt1
box[x][19] = topPos
	}
if(cVpY == "sNam7"){
tTbg1 = 255 - ((((zAOffY - zAMin) / (zAMax - zAMin)) *255))
var fntBkgnd = parseInt(tTbg1)
grayBg1 = "rgb(" + fntBkgnd + ", " + fntBkgnd + ", " + fntBkgnd +")"
newColor = grayBg1
document.all("text"+ x +"I").style.backgroundColor = newColor
document.all.sNam7.style.backgroundColor = newColor
box[x][11] = newColor
box[x][20] = topPos
	}
if(cVpY == "sNam8"){
	tFtpad1 = 15 - ((((zAOffY - zAMin) / (zAMax - zAMin)) *15))
var fntpadng = parseInt(tFtpad1)
padVal1 = fntpadng
document.all("text"+ x +"I").style.padding = padVal1
document.all.sNam8.innerHTML = fntpadng
box[x][10] = fntpadng
box[x][21] = topPos
	}
if(cVpY == "sNam9"){
tTline1 = 35 + ((((zAOffY - zAMin) / (zAMax - zAMin)) *100))
fntLine1 = parseInt(tTline1)
fntLine1 = fntLine1+"%"
document.all("text"+ x +"I").style.lineHeight = fntLine1
document.all.sNam9.innerHTML = fntLine1
box[x][9] = fntLine1
box[x][22] = topPos
	}

//document.all("adTextBox" + x).value = document.all("text"+ x +"I").style.backgroundColor
}
if(document.all.box13I && cVpY == "picBar"){
	picSizeV = 100+ ((((zAOffY - zAMin) / (zAMax - zAMin)) *500))
picSize = parseInt(picSizeV)
document.all.box13I.style.width = picSize
box[13][3] = picSize
document.all.picCnter.innerHTML = picSize
}
}
	return true
}
function aZSlide(slider, state, min, max){
	cVpY = slider
	zAjust = state
	zAMin = min
	zAMax = max
		if (zAjust == 0){
	document.onmousemove = getMouseXY
		zAjust = 1
		zTpAA = zApY		
	} else {
		zAjust = 0
		}
}

function makeAText(x){
x = stipTide();
tadon = " onkeyup='enterMain(this.event)' contenteditable='true' onclick='selectChunk();enterMain(this.event)'cancelBubble=true; oncontextmenu=event.cancelBubble=true; onmousedown='setSliderSetX(this.id);cnTrl(this.id);'"
newText = "<DIV ID='text" + x + "I'  CLASS='draggable' STYLE='visibility:" + box[x][23] + ";position:absolute;left:" + box[x][1] + ";top:" + box[x][2] + ";width:" + box[x][3] + ";height:" + box[x][4] + ";color:"+ box[x][5] +";font-size:" + box[x][6] + "pt;font-family:" + box[x][7] + ";text-align:" + box[x][8] + ";line-height:"+ box[x][9] +";padding:"+ box[x][x] + ";background-color:"+  box[x][11] +";border:"+ box[x][12] + " " + box[x][13] + ";filter:" + box[x][35]  + ";'" +  tadon + ">" + box[x][0] + "</DIV>"
document.all.mainD.innerHTML = document.all.mainD.innerHTML + newText
//onresize='setSliderSetY(this.id);'
}
function setSliderSetX(x){
tide = x;
if(x == "text10I"){x = 10;}
if(x == "text11I"){x = 11;}
if(x == "text12I"){x = 12;}
x = stipTide();
setSliderSet(x)
}

function setSliderSetY(x){
tide = x;
if(x == "text10I"){x = 10;}
if(x == "text11I"){x = 11;}
if(x == "text12I"){x = 12;}
x = stipTide();
}
titl = 0
function setSliderSetZ(x){
if(startUp == 0){infoHelp = document.all.mainD.innerHTML;document.all.mainD.innerHTML = "";startUp = 1}
x = x

if(!document.all.DocXD){
if(x == 12 && !document.all.text12I && document.all("adTextBox11").value){
tide = "text12I";x = 12;
makeAText(x)
}
if(x == 11 && !document.all.text11I && document.all("adTextBox10").value){
tide = "text11I";x = 11;
makeAText(x)
}
if(!document.all.text10I){
tide = "text10I";x = 10;
makeAText(x)
}
}if(document.all("text"+ x +"I")){setSliderSet(x)}
}

function setSliderSet(x){
if(!document.all.DocXD){
if(x == 12){titl = "Three";tide = "text12I";}
if(x == 11){titl = "Two";tide = "text11I";}
if(x == 10){titl = "One";tide = "text10I";}
box[x][23] = "visible";
document.all.textImg.src="images/text"+ x +".gif";
document.all.textEdit.innerHTML = document.all("adTextBox" + x).value ;
document.all("text"+ x +"I").style.visibility = "visible"
document.all.sNam1.style.top = box[x][14];
document.all.sNam2.style.top = box[x][15];
document.all.sNam3.style.top = box[x][16];
document.all.sNam4.style.top = box[x][17];
document.all.sNam5.style.top = box[x][18];
document.all.sNam6.style.top = box[x][19];
document.all.sNam7.style.top = box[x][20];
document.all.sNam8.style.top = box[x][21];
document.all.sNam9.style.top = box[x][22];
document.all.sNam5.innerHTML = box[x][6];
document.all.sNam6.innerHTML = box[x][12].slice(0,1);
document.all.sNam7.style.backgroundColor = box[x][11];
document.all.sNam8.innerHTML = box[x][10];
document.all.sNam9.innerHTML = box[x][9];
document.all.fFamily.selectedIndex = box[x][24]
if(box[x][36] == "0"){
document.all.upFront.checked = true;document.all.upFrontT.innerHTML = "Text on top of images "
} else {document.all.upFront.checked = false;document.all.upFrontT.innerHTML = "Text under images "}
if(box[x][11] == "transparent"){
colorHold = "rgb(255,255,255)"
	document.all.blankTa.style.visibility = "hidden";
	document.all.blankTb.style.visibility = "visible"
	} else {
colorHold = box[x][11];
	document.all.blankTb.style.visibility = "hidden";
	document.all.blankTa.style.visibility = "visible"
	}
setFilter()
}}

fXe = ""
function enterAll(evt) {
if(document.all.text10I){
x = stipTide()

box[x][0] = ""
	evt = (evt) ? evt : (window.event) ? window.event : ""
	if (evt) {
		var theKey = (evt.which) ? evt.which : evt.keyCode
		if (theKey == 13) {
document.all("adTextBox" + x).value = document.all.textEdit.innerHTML;
replaceGarb();
document.all.textEdit.innerHTML = document.all("adTextBox" + x).value;
document.all("text"+ x +"I").innerHTML = document.all("adTextBox" + x).value;
box[x][0] = document.all("adTextBox" + x).value;
return false
		}
	}
document.all("adTextBox" + x).value =  document.all.textEdit.innerHTML;
document.all("text"+ x +"I").innerHTML = document.all("adTextBox" + x).value;
box[x][0] = document.all("adTextBox" + x).value;
	return true
} else {
resetDiv();
setSliderSetZ(10);
 }}
function enterMain(evt) {
x = stipTide()
box[x][0] = ""
	evt = (evt) ? evt : (window.event) ? window.event : ""
	if (evt) {
		var theKey = (evt.which) ? evt.which : evt.keyCode
		if (theKey == 13) {
document.all("adTextBox" + x).value = document.all("text"+ x +"I").innerHTML;
replaceGarb();
document.all.textEdit.innerHTML = document.all("adTextBox" + x).value;
document.all("text"+ x +"I").innerHTML = document.all("adTextBox" + x).value;
box[x][0] = document.all("adTextBox" + x).value;
return false
		}
	}
document.all("adTextBox" + x).value = document.all("text"+ x +"I").innerHTML;
document.all.textEdit.innerHTML = document.all("adTextBox" + x).value;
box[x][0] = document.all("adTextBox" + x).value;

	return true
}

function textCorrect(x){
var texCut = textcorectIput
document.all.textCorrectimg.src = "images/corg.gif"
if(texCut =="1"){
fXe = ""
writeText()
document.all.textEdit.focus()
}
if(texCut =="2"){
fXe = ""
writeText3()
	}
}


var rng
var replbString = "<BR>"
function replaceGarb() {
x = stipTide()
    var tX = new Array('</p>','</pre>','<br><br><br>')
    var i
rts = document.all("adTextBox" + x);
for (var n = 0; n < tX.length; n++) {
rng = rts.createTextRange()
        rng.moveToElementText(rts)
        for (i = 0; rng.findText(tX[n], 10000,0); i++) {
            rng.text = replbString
            rng.collapse(false)      
        }
   }
document.all("adTextBox"+x).value = document.all("adTextBox"+x).value.slice(0,-4)
clearGarb()
}
var replString = ""
function clearGarb() {
var rts
x = stipTide()
    var tX = new Array('<p>', '<pre>' ,'&nbsp;' ,'<FONT style="BACKGROUND-COLOR: #ffffff">','</font>')
    var i
rts = document.all("adTextBox" + x);
for (var n = 0; n < tX.length; n++) {
rng = rts.createTextRange()
        rng.moveToElementText(rts)
        for (i = 0; rng.findText(tX[n], 10000,0); i++) {
            rng.text = replString
            rng.collapse(false)      
   }
}
}

var fXe = ""
var range
function selectChunk() {
if(stipTide2() == "text"){
range = window.event.srcElement.parentTextEdit.createTextRange()
	var x = window.event.clientX
	var y = window.event.clientY
	if (window.event.srcElement.parentTextEdit) {
		range = window.event.srcElement.parentTextEdit.createTextRange()
		range.collapse()
		range.moveToPoint(x, y)
		range.expand('character')
		fXe = range.text
if (fXe==""){
document.all.textCorrectimg.src = "images/corg.gif"
}else{
document.all.textCorrectimg.src = "images/corr.gif"
		}
	}
}}
var colorVal
function cngFntclr(newClr){
if(stipTide2() == "text"){
x = stipTide()
colorVal = newClr
if(tyPeC=="text"){box[x][5] = newClr;
document.all("text"+ x +"I").style.color = newClr;
}
if(tyPeC=="border"){
box[x][13] = newClr;
document.all("text"+ x +"I").style.borderColor = box[x][13];

}
if(tyPeC=="shade"){box[x][11] = newClr;
document.all("text"+ x +"I").style.background = newClr;
	document.all.blankTa.style.visibility = "visible"
	document.all.blankTb.style.visibility = "hidden"
colorHold = newClr
}
if(tyPeC=="shadow"){box[x][15] = newClr;
}}}
tyPeC ="text"
function colorType(tyPe){
tyPeC = tyPe
if (tyPe == "text"){
document.all.txtcol1.src ="images/cltxd.gif"
document.all.txtcol2.src ="images/clb.gif"
document.all.txtcol4.src ="images/clbds.gif"
}
if (tyPe == "border"){
document.all.txtcol1.src ="images/cltx.gif"
document.all.txtcol2.src ="images/clbd.gif"
document.all.txtcol4.src ="images/clbds.gif"
}
if (tyPe == "shadow"){
document.all.txtcol1.src ="images/cltx.gif"
document.all.txtcol2.src ="images/clb.gif"
document.all.txtcol4.src ="images/clbds.gif"
}
if (tyPe == "shade"){
document.all.txtcol1.src ="images/cltx.gif"
document.all.txtcol2.src ="images/clb.gif"
document.all.txtcol4.src ="images/clbdsd.gif"
}
}
function undoTransTa() {
x = stipTide()
document.all.sNam7.style.backgroundColor = colorHold
document.all("text"+ x +"I").style.backgroundColor = colorHold
	document.all.blankTa.style.visibility = "visible"
	document.all.blankTb.style.visibility = "hidden"
box[x][11] = colorHold
}
colorHold = "rgb(255,255,255)"
function doTransTa(){
x = stipTide()
document.all.sNam7.style.backgroundColor = "transparent"
document.all("text"+ x +"I").style.backgroundColor = "transparent"
	document.all.blankTa.style.visibility = "hidden"
	document.all.blankTb.style.visibility = "visible"
box[x][11] = "transparent"
}
function cngFont() {
x = stipTide()
var tFont = document.all.fFamily.options[document.all.fFamily.selectedIndex].text
box[x][7] = tFont
box[x][24] = document.all.fFamily.selectedIndex
document.all("text"+ x +"I").style.fontFamily = tFont
}
function cngLFont() {
x = stipTide()
if(tide){
var tFont = document.all.lFamily.options[document.all.lFamily.selectedIndex].text
box[x][7] = tFont
box[x][24] = document.all.lFamily.selectedIndex
document.all("box"+ x +"IA").style.fontFamily = tFont
}}
function getSystemFonts(){
	var f = dlgHelper.fonts;
	var c = f.Count;
	var i, n = 0, a = [], s, e;
	for (i = 1; i < c; i++) {
		if (f(i)) {
			a[n++] = f(i).toString();
		}
	} 
	a.sort();
for (i = 0; i < n; i++) {
e = a[i]
        document.all.fFamily.options[i] = new Option(e)
        document.all.lFamily.options[i] = new Option(e)
	}
}
function textAdjust(a){
x = stipTide()
a = box[x][8]
if(a =="left"){
box[x][8] ="center"
document.all("text"+ x +"I").style.textAlign ="center"
	}
if(a =="center"){
box[x][8] ="right"
document.all("text"+ x +"I").style.textAlign ="right"
	}
if(a =="right"){
box[x][8] ="left"
document.all("text"+ x +"I").style.textAlign ="left"
	}
}
function sssr(){
with (document.all) {
docKetC.innerHTML = TEXTCONTROLS.innerHTML
TEXTCONTROLS.innerHTML = ""
sliderBga.style.left =80
sliderBga.style.top =2
sliderBga.style.width = 250
sliderBga.style.height = 80
//sliderBga.style.zoom = "90%"
sNam1.style.visibility = "hidden"
sNam2.style.visibility = "hidden"
HTrk.style.visibility = "hidden"
GTrk.style.visibility = "hidden"
textColorPallet.style.left = 540
textColorPallet.style.top = 2
fFamilyH.style.left = 397
fFamilyH.style.top = 40
commdH.style.left = 335
commdH.style.top = 9
commdH.style.width = 205
commdH.style.height = 60
blankTa.style.left =90
blankTa.style.top =45
blankTb.style.left =90
blankTb.style.top =45
textCorrectBut.style.top =10
textCorrectBut.style.left =92
etC.style.visibility = "visible"
newCloseBut.style.left =780
newCloseBut.style.visibility = "visible"
docBText.disabled = true 
docBText.style.visibility = "hidden"
wrapper.style.left =780
wrapper.style.visibility = "visible"
editEx.style.left = 834;
adText.style.top = "-500"
	}
}
function tttr(){
with (document.all){
TEXTCONTROLS.innerHTML = docKetC.innerHTML
docKetC.innerHTML = ""
sliderBga.style.left =1
sliderBga.style.top =1
sliderBga.style.width = 250
sliderBga.style.height = 80
//sliderBga.style.zoom = "100%"
sNam1.style.visibility = "visible"
sNam2.style.visibility = "visible"
HTrk.style.visibility = "visible"
GTrk.style.visibility = "visible"
textColorPallet.style.left = 256
textColorPallet.style.top = 1
fFamilyH.style.left = 5
fFamilyH.style.top = 85
commdH.style.left = 135
commdH.style.top = 85
commdH.style.width = 325
commdH.style.height = 80
blankTa.style.left =460
blankTa.style.top =85
blankTb.style.left =460
blankTb.style.top =85
textCorrectBut.style.top =125
textCorrectBut.style.left =460
etC.style.visibility = "hidden"
newCloseBut.style.left =7
newCloseBut.style.visibility = "hidden"
docBText.disabled = false
docBText.style.visibility = "visible" 
wrapper.style.left =7
wrapper.style.visibility = "hidden"
editEx.style.left = -840;
adText.style.top = "330"
	}
}
var docH = "off"
function docOff(){
if(docH == "on"){
docH = "off"
docText()
	}
}
function preDoc(){
x = stipTide()
if(x){
if(docH == "on"){
docH = "off"
docText()
} else {
docH = "on"
docText()
	}
}}
idDocXE = 0
idholdE = "<DIV id =docKPE>"
idDocE = "<DIV id =docKEX>"
function docText(){
x = stipTide()
tadonE = " onkeyup='enterMain(this.event)' contenteditable='true' onclick='selectChunk();enterMain(this.event);' oncontextmenu=event.cancelBubble=true;" 
idDocXE = "<DIV ID='text" + x + "I'  CLASS='none' STYLE='visibility:" + box[x][23] + ";position:absolute;left:75;top:100;width:" + box[x][3] + ";height:" + box[x][4] + ";color:"+ box[x][5] +";font-size:" + box[x][6] + "pt;font-family:" + box[x][7] + ";text-align:" + box[x][8] + ";line-height:"+ box[x][9] +";padding:"+ box[x][x] + ";background-color:"+  box[x][11] +";border:"+ box[x][12] + " " + box[x][13] + ";filter:" + box[x][35]  + ";'" +  tadonE + ">"
if(docH == "on"){
document.all("text"+ x +"I").outerHTML = idDocE
document.all.docKPE.outerHTML = idDocXE
document.all("text"+ x +"I").innerHTML = box[x][0]
	document.all.docKetH.style.top = "5"
	document.all.docKetH.style.left = "5"
sssr()
}
if(docH == "off"){
tadon = " onkeyup='enterMain(this.event)' contenteditable='true' onContextMenu='meau()' onclick='selectChunk();enterMain(this.event);cancelBubble=true' oncontextmenu=event.cancelBubble=true; onmousedown='setSliderSetX(this.id);cnTrl(this.id);'"
idDocXE = "<DIV ID='text" + x + "I'  CLASS='draggable' STYLE='visibility:" + box[x][23] + ";position:absolute;left:" + box[x][1] + ";top:" + box[x][2] + ";width:" + box[x][3] + ";height:" + box[x][4] + ";color:"+ box[x][5] +";font-size:" + box[x][6] + "pt;font-family:" + box[x][7] + ";text-align:" + box[x][8] + ";line-height:"+ box[x][9] +";padding:"+ box[x][x] + ";background-color:"+  box[x][11] +";border:"+ box[x][12] + " " + box[x][13] + ";filter:" + box[x][35]  + ";'" +  tadon + ">"
document.all("text"+ x +"I").outerHTML = idholdE
document.all("docKEX").outerHTML = idDocXE
document.all("text"+ x +"I").innerHTML = box[x][0]
	document.all.docKetH.style.top = "-1000"
tttr()
	}
}
function wrapBoarders(){
x = stipTide()
if(document.all("text"+ x +"I").innerHTML){
document.all("text"+ x +"I").style.height = ""
document.all("text"+ x +"I").style.width = ""
box[x][3] = ""
box[x][4] = ""
}}
//===========================================================================
var engaged = false
var offsetX = 0
var offsetY = 0
function dragIt(evt) {
j = stipTide()
	evt = (evt) ? evt : (window.event) ? window.event : ""
	var targElem = (evt.target) ? evt.target : evt.srcElement
	if (targElem.className == "draggable") {
		while (targElem.id != tide && targElem.parentNode) {
			targElem = targElem.parentNode
		}
	if (engaged) {
		event.cancelBubble = true
		if (targElem.className == "draggable") {
				sLeft = (evt.clientX - offsetX) *1.6
				sTop = (evt.clientY - offsetY) *1.6
		xLeft  = targElem.offsetLeft
		xTop  = targElem.offsetTop
nWidth = parseInt(document.getElementById(tide).style.width)
nHeight = parseInt(document.getElementById(tide).style.height)
mLeft = maxL - nWidth
mTop = maxB - nHeight
if(sLeft >1 &&  xLeft < mLeft){targElem.style.left = sLeft};
if(sTop >1 &&  xTop < mTop){targElem.style.top = sTop};
if(xLeft > mLeft){release();xLeft =mLeft-2; targElem.style.left = xLeft};
if(xTop > mTop){release();xTop = mTop-2;targElem.style.top = xTop};

	}
		}
			return false
	}  		event.cancelBubble = true;		engaged = false;
}
function engage(evt) {
j = stipTide()
	evt = (evt) ? evt : (window.event) ? window.event : ""
	var targElem = (evt.target) ? evt.target : evt.srcElement
	if (targElem.className == "draggable") {
		while (targElem.id != tide && targElem.parentNode) {
			targElem = targElem.parentNode
		}
		if (targElem.id == tide) {
			engaged = true
		oldZ = targElem.runtimeStyle.zIndex
		targElem.style.zIndex = 10000
		targElem.style.border = '1pt dashed black'
				offsetX = evt.offsetX
				offsetY = evt.offsetY
		xLeft  = targElem.offsetLeft
		xTop  = targElem.offsetTop
nWidth = parseInt(document.getElementById(tide).style.width)
nHeight = parseInt(document.getElementById(tide).style.height)
box[j][1] = xLeft
box[j][2] = xTop
box[j][3] = nWidth
box[j][4] = nHeight
if(targElem.tagName == "IMG"){
	document.all.aJobs.value  = nWidth
		document.all.bJobs.value  = nHeight
		document.all.cJobs.value  = xLeft 
		document.all.dJobs.value  = xTop
		document.all.eJobs.value  = tide
		document.all.hJobs.value  = parseInt(tide.slice(3,-1))+1
		focusImg  = targElem.nameProp
document.all.gJobs.value = focusImg.slice(0,-4);
document.all.tId.value =  tide
clearFilter()
}
			}
			return false
	}
}
function release(evt) {
x = stipTide()
	evt = (evt) ? evt : (window.event) ? window.event : ""
	var targElem = (evt.target) ? evt.target : evt.srcElement
if(targElem){
	if (targElem.className == "draggable") {

		while (targElem.id != tide && targElem.parentNode) {
			targElem = targElem.parentNode
}
		if (engaged && targElem.id == tide) {
			engaged = false
targElem.style.zIndex = oldZ+100
box[x][1] = xLeft
box[x][2] = xTop
box[x][3] = nWidth
box[x][4] = nHeight
if(targElem.tagName == "IMG"){
		document.all.aJobs.value  = nWidth
		document.all.bJobs.value  = nHeight
		document.all.cJobs.value  = xLeft 
		document.all.dJobs.value  = xTop
		document.all.eJobs.value  = tide
}
if(targElem.tagName == "DIV"){targElem.style.border = box[x][12];targElem.style.borderColor = box[x][13]
}else{
targElem.style.border = 0
		focusImg  = "images/" + targElem.nameProp
document.all.gJobs.value = focusImg.slice(7,-4);
getCoords()
}

}}}}
