//http://www.coolplays.com/coloring-book/Xi/white/bot/objects/ball.gif
catG = "objects"
igP1 = "http://www.coolplays.com/coloring-book/Xi/"
box = new Array(13);
box[0] = new Array(36)
box[0][0] = 0
box[0][1] = 0
box[0][2] = 0
box[0][3] = 0
box[0][4] = 0
box[0][5] = 0
box[0][6] = 0
box[0][7] = "Arial"
box[0][8] = ""
box[0][9] = 0
box[0][10] = "white"
box[0][11] = "white"
box[0][12] = 3
box[0][13] = 4
box[0][14] = 0
box[0][15] = 0
box[0][16] = 0
box[0][17] = 0

box[0][18] = 0
box[0][19] = 0
box[0][20] = 0
box[0][21] = 0
box[0][22] = 0
box[0][23] = "hidden"
box[0][24] = 0; 
box[0][25] = 0; 
box[0][26] = 0; 
box[0][27] = 0; 
box[0][28] = 0; 
box[0][29] = 1; 
box[0][30] = 42; 
box[0][31] = 42; 
box[0][32] = 0; 
box[0][33] = "black"; 
box[0][34] = 0; 
box[0][35] = 0; 
box[1] = new Array(36)
box[1][0] = 0
box[1][1] = 0
box[1][2] = 0
box[1][3] = 0
box[1][4] = 0
box[1][5] = 0
box[1][6] = 0
box[1][7] = "Arial"
box[1][8] = ""
box[1][9] = 0
box[1][10] =  "white"
box[1][11] = "white"
box[1][12] = 3
box[1][13] = 4
box[1][14] = 0
box[1][15] = 0
box[1][16] = 0
box[1][17] = 0

box[1][18] = 0
box[1][19] = 0
box[1][20] = 0
box[1][21] = 0
box[1][22] = 0
box[1][23] = "hidden"
box[1][24] = 0; 
box[1][25] = 0; 
box[1][26] = 0; 
box[1][27] = 0; 
box[1][28] = 0; 
box[1][29] = 1; 
box[1][30] = 42; 
box[1][31] = 42; 
box[1][32] = 0; 
box[1][33] = "black"; 
box[1][34] = 0; 
box[1][35] = 0; 
box[2] = new Array(36)
box[2][0] = 0
box[2][1] = 0
box[2][2] = 0
box[2][3] = 0
box[2][4] = 0
box[2][5] = 0
box[2][6] = 0
box[2][7] = "Arial"
box[2][8] = ""
box[2][9] = 0
box[2][10] =  "white"
box[2][11] = "white"
box[2][12] = 3
box[2][13] = 4
box[2][14] = 0
box[2][15] = 0
box[2][16] = 0
box[2][17] = 0

box[2][18] = 0
box[2][19] = 0
box[2][20] = 0
box[2][21] = 0
box[2][22] = 0
box[2][23] = "hidden"
box[2][24] = 0; 
box[2][25] = 0; 
box[2][26] = 0; 
box[2][27] = 0; 
box[2][28] = 0; 
box[2][29] = 1; 
box[2][30] = 42; 
box[2][31] = 42; 
box[2][32] = 0; 
box[2][33] = "black"; 
box[2][34] = 0; 
box[2][35] = 0; 
box[3] = new Array(36)
box[3][0] = 0
box[3][1] = 0
box[3][2] = 0
box[3][3] = 0
box[3][4] = 0
box[3][5] = 0
box[3][6] = 0
box[3][7] = "Arial"
box[3][8] = ""
box[3][9] = 0
box[3][10] =  "white"
box[3][11] = "white"
box[3][12] = 3
box[3][13] = 4
box[3][14] = 0
box[3][15] = 0
box[3][16] = 0
box[3][17] = 0

box[3][18] = 0
box[3][19] = 0
box[3][20] = 0
box[3][21] = 0
box[3][22] = 0
box[3][23] = "hidden"
box[3][24] = 0; 
box[3][25] = 0; 
box[3][26] = 0; 
box[3][27] = 0; 
box[3][28] = 0; 
box[3][29] = 1; 
box[3][30] = 42; 
box[3][31] = 42; 
box[3][32] = 0; 
box[3][33] = "black"; 
box[3][34] = 0; 
box[3][35] = 0; 

box[4] = new Array(36)
box[4][0] = 0
box[4][1] = 0
box[4][2] = 0
box[4][3] = 0
box[4][4] = 0
box[4][5] = 0
box[4][6] = 0
box[4][7] = "Arial"
box[4][8] = ""
box[4][9] = 0
box[4][10] =  "white"
box[4][11] = "white"
box[4][12] = 3
box[4][13] = 4
box[4][14] = 0
box[4][15] = 0
box[4][16] = 0
box[4][17] = 0

box[4][18] = 0
box[4][19] = 0
box[4][20] = 0
box[4][21] = 0
box[4][22] = 0
box[4][23] = "hidden"
box[4][24] = 0; 
box[4][25] = 0; 
box[4][26] = 0; 
box[4][27] = 0; 
box[4][28] = 0; 
box[4][29] = 1; 
box[4][30] = 42; 
box[4][31] = 42; 
box[4][32] = 0; 
box[4][33] = "black"; 
box[4][34] = 0; 
box[4][35] = 0; 
box[5] = new Array(36)
box[5][0] = 0
box[5][1] = 0
box[5][2] = 0
box[5][3] = 0
box[5][4] = 0
box[5][5] = 0
box[5][6] = 0
box[5][7] = "Arial"
box[5][8] = ""
box[5][9] = 0
box[5][10] =  "white"
box[5][11] = "white"
box[5][12] = 3
box[5][13] = 4
box[5][14] = 0
box[5][15] = 0
box[5][16] = 0
box[5][17] = 0

box[5][18] = 0
box[5][19] = 0
box[5][20] = 0
box[5][21] = 0
box[5][22] = 0
box[5][23] = "hidden"
box[5][24] = 0; 
box[5][25] = 0; 
box[5][26] = 0; 
box[5][27] = 0; 
box[5][28] = 0; 
box[5][29] = 1; 
box[5][30] = 42; 
box[5][31] = 42; 
box[5][32] = 0; 
box[5][33] = "black"; 
box[5][34] = 0; 
box[5][35] = 0; 
box[6] = new Array(36)
box[6][0] = 0
box[6][1] = 0
box[6][2] = 0
box[6][3] = 0
box[6][4] = 0
box[6][5] = 0
box[6][6] = 0
box[6][7] = "Arial"
box[6][8] = ""
box[6][9] = 0
box[6][10] =  "white"
box[6][11] = "white"
box[6][12] = 3
box[6][13] = 4
box[6][14] = 0
box[6][15] = 0
box[6][16] = 0
box[6][17] = 0

box[6][18] = 0
box[6][19] = 0
box[6][20] = 0
box[6][21] = 0
box[6][22] = 0
box[6][23] = "hidden"
box[6][24] = 0; 
box[6][25] = 0; 
box[6][26] = 0; 
box[6][27] = 0; 
box[6][28] = 0; 
box[6][29] = 1; 
box[6][30] = 42; 
box[6][31] = 42; 
box[6][32] = 0; 
box[6][33] = "black"; 
box[6][34] = 0; 
box[6][35] = 0; 
box[7] = new Array(36)
box[7][0] = 0
box[7][1] = 0
box[7][2] = 0
box[7][3] = 0
box[7][4] = 0
box[7][5] = 0
box[7][6] = 0
box[7][7] = "Arial"
box[7][8] = ""
box[7][9] = 0
box[7][10] =  "white"
box[7][11] = "white"
box[7][12] = 3
box[7][13] = 4
box[7][14] = 0
box[7][15] = 0
box[7][16] = 0
box[7][17] = 0

box[7][18] = 0
box[7][19] = 0
box[7][20] = 0
box[7][21] = 0
box[7][22] = 0
box[7][23] = "hidden"
box[7][24] = 0; 
box[7][25] = 0; 
box[7][26] = 0; 
box[7][27] = 0; 
box[7][28] = 0; 
box[7][29] = 1; 
box[7][30] = 42; 
box[7][31] = 42; 
box[7][32] = 0; 
box[7][33] = "black"; 
box[7][34] = 0; 
box[7][35] = 0; 
box[8] = new Array(36)
box[8][0] = 0
box[8][1] = 0
box[8][2] = 0
box[8][3] = 0
box[8][4] = 0
box[8][5] = 0
box[8][6] = 0
box[8][7] = "Arial"
box[8][8] = ""
box[8][9] = 0
box[8][10] =  "white"
box[8][11] = "white"
box[8][12] = 3
box[8][13] = 4
box[8][14] = 0
box[8][15] = 0
box[8][16] = 0
box[8][17] = 0

box[8][18] = 0
box[8][19] = 0
box[8][20] = 0
box[8][21] = 0
box[8][22] = 0
box[8][23] = "hidden"
box[8][24] = 0; 
box[8][25] = 0; 
box[8][26] = 0; 
box[8][27] = 0; 
box[8][28] = 0; 
box[8][29] = 1; 
box[8][30] = 42; 
box[8][31] = 42; 
box[8][32] = 0; 
box[8][33] = "black"; 
box[8][34] = 0; 
box[8][35] = 0; 
box[9] = new Array(36)
box[9][0] = 0
box[9][1] = 0
box[9][2] = 0
box[9][3] = 0
box[9][4] = 0
box[9][5] = 0
box[9][6] = 0
box[9][7] = "Arial"
box[9][8] = ""
box[9][9] = 0
box[9][10] =  "white"
box[9][11] = "white"
box[9][12] = 3
box[9][13] = 4
box[9][14] = 0
box[9][15] = 0
box[9][16] = 0
box[9][17] = 0

box[9][18] = 0
box[9][19] = 0
box[9][20] = 0
box[9][21] = 0
box[9][22] = 0
box[9][23] = "hidden"
box[9][24] = 0; 
box[9][25] = 0; 
box[9][26] = 0; 
box[9][27] = 0; 
box[9][28] = 0; 
box[9][29] = 1; 
box[9][30] = 42; 
box[9][31] = 42; 
box[9][32] = 0; 
box[9][33] = "black"; 
box[9][34] = 0; 
box[9][35] = 0; 

box[10] = new Array(37);
box[10][0] = ""; 
box[10][1] = 40; 
box[10][2] = 140; 
box[10][3] = 300; 
box[10][4] = 200; 
box[10][5] = "black"; 
box[10][6] = 14; 
box[10][7] = "Arial"; 
box[10][8] = "center"; 
box[10][9] = "100%"; 
box[10][10] = 3; 
box[10][11] = "green"; 
box[10][12] = "2pt solid" 
box[10][13] = "red";
box[10][14] = 7; 
box[10][15] = 47; 
box[10][16] = 50; 
box[10][17] = 18; 
box[10][18] = 48; 
box[10][19] = 25; 
box[10][20] = 0; 
box[10][21] = 40; 
box[10][22] =33; 
box[10][23] = "visible"; 
box[10][24] = 0; 
box[10][25] = 0; 
box[10][26] = 0; 
box[10][27] = 0; 
box[10][28] = 0; 
box[10][29] = 1; 
box[10][30] = 42; 
box[10][31] = 42; 
box[10][32] = 0; 
box[10][33] = "black"; 
box[10][34] = 0; 
box[10][35] = 0; 
box[10][36] = 0; 

box[11] = new Array(37);
box[11][0] = ""; 
box[11][1] = 80; 
box[11][2] = 350; 
box[11][3] = 300; 
box[11][4] = 200; 
box[11][5] = "black"; 
box[11][6] = 14; 
box[11][7] = "Arial"; 
box[11][8] = "center"; 
box[11][9] = "100%";  
box[11][10] = 3; 
box[11][11] = "white"; 
box[11][12] = "2pt solid" 
box[11][13] = "purple"; 
box[11][14] = 21; 
box[11][15] = 45; 
box[11][16] = 50; 
box[11][17] = 18; 
box[11][18] = 48; 
box[11][19] = 25; 
box[11][20] = 0; 
box[11][21] = 40; 
box[11][22] = 33; 
box[11][23] = "hidden"; 
box[11][24] = 0; 
box[11][25] = 0; 
box[11][26] = 0; 
box[11][27] = 0; 
box[11][28] = 0; 
box[11][29] = 1; 
box[11][30] = 42; 
box[11][31] = 42; 
box[11][32] = 0; 
box[11][33] ="black"; 
box[11][34] = 0; 
box[11][35] = 0; 
box[11][36] = 0; 

box[12] = new Array(37);
box[12][0] = ""; 
box[12][1] = 160; 
box[12][2] = 555; 
box[12][3] = 300; 
box[12][4] = 200; 
box[12][5] = "green"; 
box[12][6] = 14; 
box[12][7] = "Arial"; 
box[12][8] = "center"; 
box[12][9] = "100%";  
box[12][10] = 3; 
box[12][11] = "orange"; 
box[12][12] = "2pt solid"; 
box[12][13] = "blue"; 
box[12][14] = 31; 
box[12][15] = 36; 
box[12][16] = 50; 
box[12][17] = 18; 
box[12][18] = 48; 
box[12][19] = 25; 
box[12][20] = 0; 
box[12][21] = 40; 
box[12][22] = 33; 
box[12][23] = "hidden"; 
box[12][24] = 0; 
box[12][25] = 0; 
box[12][26] = 0; 
box[12][27] = 0; 
box[12][28] = 0; 
box[12][29] = 1; 
box[12][30] = 42; 
box[12][31] = 42; 
box[12][32] = 0; 
box[12][33] = "black"; 
box[12][34] = 0; 
box[12][35] = 0;
box[12][36] = 0;

box[13] = new Array(37);
box[13][0] = "images/clear.gif"; 
box[13][1] = 160; 
box[13][2] = 555; 
box[13][3] = 400; 
box[13][4] = "auto"; 
box[13][5] = ""; 
box[13][6] = 0; 
box[13][7] = ""; 
box[13][8] = ""; 
box[13][9] = "";  
box[13][10] = 3; 
box[13][11] = ""; 
box[13][12] = ""; 
box[13][13] = ""; 
box[13][14] = 0; 
box[13][15] = 0; 
box[13][16] = 0; 
box[13][17] = 0; 
box[13][18] = 0; 
box[13][19] = 0; 
box[13][20] = 0; 
box[13][21] = 0; 
box[13][22] = 0; 
box[13][23] = "hidden"; 
box[13][24] = 0; 
box[13][25] = 0; 
box[13][26] = 0; 
box[13][27] = 0; 
box[13][28] = 0; 
box[13][29] = 1; 
box[13][30] = 42; 
box[13][31] = 42; 
box[13][32] = 0; 
box[13][33] = "black"; 
box[13][34] = 0; 
box[13][35] = 0;
box[13][36] = 0;
idhold = 0
idhold1 = 0
idDoc = "<DIV id =docKP>"
idDocX = "<DIV id =DocXD>"
idDocA = "<DIV id ='topDIV'></DIV>"
idDocB = "<DIV id ='topDIV'>"
 mainDoc = 0   
tide = ""
tideH = 0
zoomX = "100%"
boxHold0 = new Array(36)
boxHold1 = new Array(36)
bgISty = ""
bgRSty ="no-repeat"
bgCSty ="white"
var focusImg
xtTop = 10
xtLeft = 10
xTop = 10
xLeft = 10
nWidth = 150
nHeight = 150
var nuImagProp
ImgVs = "hidden"
tempLabex = new Array(10)
tempLabex[0]
tempLabex[1]
tempLabex[2]
tempLabex[3]
tempLabex[4]
tempLabex[5]
tempLabex[6]
tempLabex[7]
tempLabex[8]
tempLabex[9]
pageSizeW = 745
pageSizeH = 985
maxL = 745
maxB = 985
nBN = 0;
tBoxs = 10
igP2 = catG + "/"
igP3 = "white"
startUp = 0
var infoHelp
function cnTrl(tid) {
AIfilter = "off"
maxL = 745
maxB = 985
tide = tid
if(tid){
if(tide == tideH){;if(stipTide2() == "text"){mainIk('adText','Add Text Boxes')};if(stipTide2() == "box"){mainIk('adPicture1','Coloring Images')}}else{resetDiv();if(stipTide2() == "text"){mainIk('adText','Add Text Boxes')};if(stipTide2() == "box"){mainIk('adPicture1','Coloring Images')}}
if(!document.all.DocXD){
tideH = tid
idhold = document.all(tide).outerHTML
if(document.all(tide).innerHTML){
idhold1 = document.all(tide).innerHTML
document.all(tide).innerHTML = " "
} else {
idhold1 = ""
}
document.all(tide).outerHTML = idDocX
document.all.topDIV.outerHTML = idhold
if(idhold1){document.all(tide).innerHTML = idhold1}
document.all.mainD.innerHTML = document.all.mainD.innerHTML + idDocA
document.all.result.style.contenteditable='true'
document.all.result.style.visibility = "visible"
}
document.onmousedown = engage
document.onmousemove = dragIt
document.onmouseup = release
document.onmouseout = release
}
}
function contolReader(read){
document.all.controlFunction.innerText = read
	body.style.pixelTop = event.clientY + document.body.scrollTop
	body.style.pixelLeft = event.clientX + document.body.scrollLeft
	body.style.visibility = "visible"
	event.returnValue = false
}
function resetDiv(){
if(document.all.DocXD){
if(document.all(tideH)){idhold = document.all(tideH).outerHTML
if(document.all(tideH).innerHTML){idhold1 = document.all(tideH).innerHTML
} else {
idhold1 = ""
}}
document.all.DocXD.outerHTML = ""
if(document.all(tideH)){document.all.topDIV.outerHTML = idhold
} else {document.all.topDIV.outerHTML = ""
}
document.all.result.innerHTML = idDocA
if(idhold1 && document.all(tideH)){document.all(tideH).innerHTML = idhold1}

document.all.result.style.contenteditable='false'
document.all.result.style.visibility = "hidden"
checkD()
}}

brdA = new Array(28);
brdA[0] = "No Border"; 
brdA[1] = "Gray Bubbles"; 
brdA[2] = "Frosted"; 
brdA[3] = "Black Bubbles"; 
brdA[4] = "3D Bubbles"; 
brdA[5] = "Black Diamond";; 
brdA[6] = "Black Diamonds"; 
brdA[7] = "Fuzz Diamonds";  
brdA[8] = "Big Plad";  
brdA[9] = "Birds Feet";  
brdA[10] = "Small Fuzz";  
brdA[11] = "Big Fuzz"; 
brdA[12] = "Pin Stripe"; 
brdA[13] = "Three Lines"; 
brdA[14] = "3D Stripe"; 
brdA[15] = "Curved Stripe"; 
brdA[16] = "Black Line";  
brdA[17] = "Black Stripe"; 
brdA[18] = "Gray Stripe"; 
brdA[19] = "Red Stripe"; 
brdA[20] = "Lime Stripe"; 
brdA[21] = "Yellow Stripe"; 
brdA[22] = "Blue Stripe"; 
brdA[23] = "Purple Stripe"; 
brdA[24] = "Orange Stripe"; 
brdA[25] = "Pink Stripe"; 
brdA[26] = "Green Stripe"; 
brdA[27] = "White Stripe"; 

function borderIt(b) {
var b = b
if(b == 'x'){
b = borderOn
}
drawBrds = "<div style='height:200;width:200;padding:5;background:transparent;padding-Left:12;padding-top:2;color:RED;font-size:16;font-family:Arial;font-weight:bold;border-right:2 solid  #dddddd;border-left:2 solid #000000;border-bottom:2 solid #dddddd;'><BR><BR><IMG ID='brd" + b + " ' onClick='borderIt(" + b + ")' SRC='Xi/borders/bdrx" + b + ".gif' ALT='border' HEIGHT='30' WIDTH='29' BORDER='0' align=absmiddle>&nbsp;&nbsp;&nbsp;" + brdA[b] + "<BR><BR>"
		for (var i = 0; i < brdA.length; i++) { 
drawBrds += "<IMG ID='brd" + [i] + " ' onClick='borderIt(" + [i] + ")' SRC='Xi/borders/bdrx" + [i] + ".gif' ALT='border' HEIGHT='30' WIDTH='29' BORDER='0'>"
	}
drawBrds += "</div>"
document.all.borderHold.innerHTML = drawBrds
document.all("bordV").src = "Xi/borders/brd" + b + ".gif"
borderOn  = b
}
var jKv = "hidden"
var tPy = "-2000"
function hideAllControls() {with(document.all){
	borders.style.visibility = jKv
	borders.style.top = tPy
	adText.style.top = tPy
	adPicture1.style.top = tPy
	addName.style.visibility = jKv
	addName.style.top = tPy
	PrintDisplay.style.top = tPy
	PrintDisplay.style.visibility = jKv
	yourImgc.style.top = tPy
	yourImgc.style.visibility = jKv
extrasC.style.top = tPy
}}

var theHControl = "start"
var theVcontrol = "Side"
function mainIk(cntrolID, title, help) {
helpNum = help
hideAllControls()
theHControl = cntrolID
theVControl = cntrolID
var cTitle = title
theControl = document.getElementById(cntrolID)
theControl.style.top = "330"
theControl.style.left = "3"
theControl.style.visibility = "visible"
	document.getElementById("controlText").innerHTML = cTitle
}

function contrk(c) {
	if (document.all("image" + c).filters[0].status == 0) {
document.all("control" + c).style.visibility = "hidden"
document.all("image" + c).style.visibility = "hidden"
document.all("image" + c).filters[0].apply()
document.all("image" + c).style.visibility = "visible"
document.all("image" + c).filters[0].play()
	}
}
function contrk1(c) {
contrv(c)
document.all("control" + c).style.visibility = "hidden"
document.all("image" + c).style.visibility = "hidden"
document.all("control" + c).filters[0].apply()
document.all("control" + c).style.visibility = "visible"
document.all("control" + c).filters[0].play()

}
function contrv(c) {
document.all("control" + c).style.visibility = "visible"
document.all("control" + c).filters[0].stop()
document.all("image" + c).filters[0].stop()
}
function checkerLoad(){
document.all.loaderC.style.zIndex = "-1"
}
function Init() {
getSystemFonts()
initCook()
	//setTimeout('hilite()',100)
	//setTimeout('setPics()', 200)
	setTimeout('checkerLoad()',1000)
	checkCol()
document.all("mainCn").style.background = allColor
document.all("addName").style.background = allColor
document.all("addName1").style.color = fontColor
document.all("borders").style.background = allColor
document.all("borders").style.color = fontColor
document.all("PrintDisplay").style.background = allColor
document.all("PrintDisplay").style.color = fontColor
document.all("yourImgc").style.color = fontColor
document.all("yourImgc").style.background = allColor
document.all("PrintDisplay").style.background = allColor
document.all("you1").style.color = fontColor
document.all("you2").style.color = fontColor
document.all("adText").style.background = allColor
document.all("adText").style.color = fontColor
document.all("extrasC").style.background = allColor
document.all("extrasC").style.color = fontColor
}
function getControl(a){
helpNum=0
saveIt('con',a)
mainHelp()
}
helpNum=0
function mainHelp(){
winCoords = "scrollbars=yes, resizable=yes,height=" + (parseInt(screen.height) - 90) +",width=" + (parseInt(screen.width) - 20)
var newWindow = window.open("","",winCoords)
newWindow.location.href="help.html#" + helpNum
newWindow.moveTo(0,90);
}
function adbox1(){
haltWarn()
if(startUp == 0){infoHelp = document.all.mainD.innerHTML;document.all.mainD.innerHTML = "";startUp = 1}
checkD()
setTimeout("adbox1a()",500)
}
function adbox1a(){
resetDiv()
if(!document.all.box9I){nBN = 9;tBoxs = tBoxs*1-1;}
if(!document.all.box8I){nBN = 8;tBoxs = tBoxs*1-1;}
if(!document.all.box7I){nBN = 7;tBoxs = tBoxs*1-1;}
if(!document.all.box6I){nBN = 6;tBoxs = tBoxs*1-1;}
if(!document.all.box5I){nBN = 5;tBoxs = tBoxs*1-1;}
if(!document.all.box4I){nBN = 4;tBoxs = tBoxs*1-1;}
if(!document.all.box3I){nBN = 3;tBoxs = tBoxs*1-1;}
if(!document.all.box2I){nBN = 2;tBoxs = tBoxs*1-1;}
if(!document.all.box1I){nBN = 1;tBoxs = tBoxs*1-1;}
if(!document.all.box0I){nBN = 0;tBoxs = tBoxs*1-1;}
box[nBN][10] = igP2
tValue = tBoxs*1+1
if(tBoxs < 10){
document.all.mainF.innerHTML = tValue + " images out of 10"
if(tBoxs == 0){
document.all.mainF.innerHTML = tValue + " image out of 10"
}
newTxt = "<IMG SRC='" + igP1 + igP3 + "/bot/" + igP2 + nuIg + ".gif'  CLASS='draggable' ID='box" + nBN + "I' STYLE='position:absolute; top:700; left:150;width:150;height:150;z-Index:" + nBN + "00' onmousedown=cnTrl(this.id);onContextMenu='meau()' ; onmouseover=addOn2(0); onmouseout=addOn2('auto')>";
newTxt += "<DIV ID='box" + nBN + "IA' style='position:absolute;left:0;top:0;height:auto;width:auto;font-size: 24;z-index:1100;cursor:default;overflow:hidden;visibility:hidden' UNSELECTABLE='on' contentEditable='false' ></DIV> "
document.all.mainCl.src = "images/b-w-on.gif"
//onContextMenu='meau()'
document.all.mainD.innerHTML = document.all.mainD.innerHTML + newTxt ;
tBoxs = 10;
warning(1,1)
//document.getElementById("box0IA" ).style.visibility = "hidden"
tide = "box" + nBN + "I"
clearFilter()
getCoords()
} else {
alert ("max Images");}}
function clearIt(){
document.all.mainD.innerHTML = "";
document.all.mainF.innerText = " 0 images out of 10"
nBN = 0;
}
function addOn2(at){
haltWarn()

	if(at == 'off'){document.all("box"+ stipTide() +"IA").style.visibility = "visible"}
	if(at == 'on'){document.all("box"+ stipTide() +"IA").style.visibility = "hidden"}
	}
//'" + igP1 + igP2 + igP3 + "/bot/" + nuIg + ".gif'
//'" + igP1 + box[x][11] + box[x][4] + "'


function xResult(x){
newResult += "<IMG ID='box"+ x +"I' src='" + igP1 + box[x][11] +"/bot/"+ box[x][10] + box[x][0] + "' style='position:absolute;left:" + box[x][1] + ";top:"+ box[x][2] + ";width:" + box[x][3] + ";height:" + box[x][4] + ";filter:" + box[x][35] + "\n' " + addOn + ">\n"
newResult += "<DIV ID='box"+ x +"IA' style='position:absolute;left:" + box[x][14] + ";top:"+ box[x][15] + ";height:auto;width:auto;font-family:" + box[x][7] + ";font-size:" + box[x][6] + ";visibility:" + box[x][23] + ";color:" + box[x][5] + ";filter:" + box[x][9] + "\n;z-index:1100;cursor:default;overflow:hidden;' UNSELECTABLE='on' contentEditable='false' >" + box[x][8] + "</DIV>\n"
}
function tResult(x){
if(box[x][36] == 1){
				newZResult += "<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][10] + ";background-color:"+  box[x][11] +";border:"+ box[x][12] + " " + box[x][13] + ";filter:" + box[x][35]  + ";'" +  tadon + ">" + box[x][0] + "</DIV>"
}
if(box[x][36] == 0){
				newResult += "<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][10] + ";background-color:"+  box[x][11] +";border:"+ box[x][12] + " " + box[x][13] + ";filter:" + box[x][35]  + ";'" +  tadon + ">" + box[x][0] + "</DIV>"
}
}
function getTheFrnt(){
x = stipTide()
box[x][36] = (document.all.upFront.checked) ? "0" : "1"
if(box[x][36] == "0"){
document.all.upFrontT.innerHTML = "Text on top of images "
} else {document.all.upFrontT.innerHTML = "Text under images "}
}
mnimgSizeX = "width:400"
mnimgSizeY = "height:400"
function drawResult(adOn){
addOn = ""
tadon = "" 
newResult = ""
newZResult = ""
if(adOn == 1){addOn = " CLASS='draggable' onmousedown=cnTrl(this.id);addOn2('on') onContextMenu='meau()' onmouseup=getCoords();addOn2('off')"}
if(adOn == 1){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);'"}
//onresize='setSliderSetY(this.id);'
newResult += "<DIV id=mImgHold STYLE='position:absolute;left:60;top:205;width:600;height:600;text-align:center'><IMG ID=box13I  style='width:"+ box[13][3] + ";height:"+ box[13][4] +";filter:" + box[13][35] + ";z-index:-100' SRC='"+ box[13][0] +"' BORDER=0 ALT='what Color' UNSELECTABLE='on'></DIV>"
if(document.all.box0I)xResult(0);
if(document.all.box1I)xResult(1);
if(document.all.box2I)xResult(2);
if(document.all.box3I)xResult(3);
if(document.all.box4I)xResult(4);
if(document.all.box5I)xResult(5);
if(document.all.box6I)xResult(6);
if(document.all.box7I)xResult(7);
if(document.all.box8I)xResult(8);
if(document.all.box9I)xResult(9);
if(document.all.text12I && document.all("adTextBox12").value)tResult(12);
if(document.all.text11I && document.all("adTextBox11").value)tResult(11);
if(document.all.text10I && document.all("adTextBox10").value)tResult(10);
newResult += msg
dert = newZResult + newResult
newResult = dert
brde = "<DIV ID=mainB STYLE='position:absolute;left:0;top:0;width:745;height:985;background-color:"+ bgCSty +"; background:" + bgCSty + " " + bgISty + " " +bgRSty + ";'><IMG ID=bordV SRC='Xi/borders/brd"+ borderOn +".gif' style='width:745;height:985;' UNSELECTABLE='on'></DIV>"
if(document.all.oDiv1)newResult += "<DIV ID='oDiv1' STYLE='position:absolute; left:0px;top:" + phwX + ";' >"+ document.all.oDiv1.innerHTML +"</DIV>";
newResult += "<DIV STYLE='position:absolute;top:920;left:580;width:150;height:32;'><IMG SRC='images/copycoolplays.gif' ALT='copycoolplays' HEIGHT='32' WIDTH='150' BORDER='0' UNSELECTABLE='on'></DIV>"
}
zIz = 10000
borderOn = 0
brde = ""
function intJ(){
oneResult = ""
drawResult(0)
oneResult = "<HTML><HEAD><TITLE>Coolplays Coloring, Print this preview!!</TITLE><META HTTP-EQUIV='imagetoolbar' CONTENT='no'></HEAD><BODY><CENTER>\n<DIV STYLE='height:985;width:780;'>" + brde + "\n" + newResult + "\n</DIV>\n</CENTER></BODY></HTML>"
makeNewWindow()
contrv(6)
}
var addOn
var oneResult
var mnimgSizeX 
var mnimgSizeY 
var newResult
var newZResult
var newWindow = null
function makeNewWindow() {
newWindow = window.open("result.htm","0","Left=0,top=0,HEIGHT=450,WIDTH=780,menubar,resizable,scrollbars")
	setTimeout("fillWindow()",1000)
}
//
function fillWindow() {
	newWindow.document.write(oneResult)
newWindow.document.close()
newWindow.focus()
}
function fixDivider() {
resetDiv()
drawResult(1)
document.all.mainD.innerHTML = newResult
}
function fixDivider1() {
drawResult(1)
document.all.mainD.innerHTML = newResult
}

function getCoords(){
if(tide){
if(document.all(tide)){
x = stipTide()
y = stipTide2()
if(y == "box" &&  x < 10){
box[x][0] = document.all("box"+ x +"I").nameProp;
box[x][1] = parseInt(document.all("box"+ x +"I").style.left);
box[x][2] = parseInt(document.all("box"+ x +"I").style.top);
box[x][3] = parseInt(document.all("box"+ x +"I").style.width);
box[x][4] = parseInt(document.all("box"+ x +"I").style.height);
box[x][14] = Math.round((box[x][3] / 36) * box[x][18]) + box[x][1]
box[x][15] = Math.round((box[x][4] / 36) * box[x][19]) + box[x][2]
document.all("box"+ x +"IA").style.left =  box[x][14]
document.all("box"+ x +"IA").style.top =  box[x][15]
document.all.mainTt.style.left = box[x][18] +60
document.all.mainTt.style.top = box[x][19] + 10
document.all.mainTt.style.visibility = box[x][23] 
box[x][6] = Math.round(box[x][3] / box[x][13])
document.all.tLabel.value = box[x][8]
document.all("box"+ x +"IA").innerHTML = box[x][8]
document.all("box"+ x +"IA").style.fontSize =  box[x][6]
document.all.textSizeP.selectedIndex = box[x][22]
document.all.tSiz.value = box[x][12]
document.all.lFamily.selectedIndex = box[x][24]
document.all("box"+ x +"IA").style.color = box[x][5]
document.all("box"+ x +"IA").style.fontFamily = box[x][7]
	}}
}}

tideNo = 0
var flipIt
var oldZ
function release2() {
}
function meau() {
	event.returnValue = false
}
//=====================================================================
function lableIt() {
}


bosL = 0
bosT = 0
PtxS = 6
tValue = 0
function checkD(){
if(!document.all(tide)){
document.all.mainTt.style.visibility = "hidden"
		document.all.aJobs.value  = ""
		document.all.bJobs.value  = ""
		document.all.cJobs.value  = ""
		document.all.dJobs.value  = ""
		document.all.eJobs.value  = ""
		document.all.hJobs.value  = ""
		document.all.gJobs.value  = ""
tide = ""
tBoxs = 10
if(!document.all.box0I){tBoxs = tBoxs*1-1;reSetBox(0);if(document.all.box0IA){document.all.box0IA.outerHTML = ""}}
if(!document.all.box1I){tBoxs = tBoxs*1-1;reSetBox(1);if(document.all.box1IA){document.all.box1IA.outerHTML = ""}}
if(!document.all.box2I){tBoxs = tBoxs*1-1;reSetBox(2);if(document.all.box2IA){document.all.box2IA.outerHTML = ""}}
if(!document.all.box3I){tBoxs = tBoxs*1-1;reSetBox(3);if(document.all.box3IA){document.all.box3IA.outerHTML = ""}}
if(!document.all.box4I){tBoxs = tBoxs*1-1;reSetBox(4);if(document.all.box4IA){document.all.box4IA.outerHTML = ""}}
if(!document.all.box5I){tBoxs = tBoxs*1-1;reSetBox(5);if(document.all.box5IA){document.all.box5IA.outerHTML = ""}}
if(!document.all.box6I){tBoxs = tBoxs*1-1;reSetBox(6);if(document.all.box6IA){document.all.box6IA.outerHTML = ""}}
if(!document.all.box7I){tBoxs = tBoxs*1-1;reSetBox(7);if(document.all.box7IA){document.all.box7IA.outerHTML = ""}}
if(!document.all.box8I){tBoxs = tBoxs*1-1;reSetBox(8);if(document.all.box8IA){document.all.box8IA.outerHTML = ""}}
if(!document.all.box9I){tBoxs = tBoxs*1-1;reSetBox(9);if(document.all.box9IA){document.all.box9IA.outerHTML = ""}}
if(!document.all.text10I){reSetText(10);document.all.adTextBox10.value=""}
if(!document.all.text11I){reSetText(11);document.all.adTextBox11.value=""}
if(!document.all.text12I){reSetText(12);document.all.adTextBox12.value=""}
document.all.mainF.innerHTML = (tBoxs*1) + " images out of 10"
if(tBoxs == 1){document.all.mainF.innerHTML = (tBoxs*1) + " image out of 10"}
if(tBoxs == 0){document.all.mainF.innerHTML = "Add Images "}
tBoxs = 10
}}

function reSetBox(x){
tempLabex[x] = ""
box[x][0] = 0
box[x][1] = 0
box[x][2] = 0
box[x][3] = 0
box[x][4] = 0
box[x][5] = 0
box[x][6] = 0
box[x][7] = "Arial"
box[x][8] = ""
box[x][9] = 0
box[x][10] = 0
box[x][11] = "white"
box[x][12] = 3
box[x][13] = 4
box[x][14] = 0
box[x][15] = 0
box[x][16] = 0
box[x][17] = 0
box[x][18] = 0
box[x][19] = 0
box[x][20] = 0
box[x][21] = 0
box[x][22] = 0
box[x][23] = "hidden";
box[x][24] = 0; 
box[x][25] = 0; 
box[x][26] = 0; 
box[x][27] = 0; 
box[x][28] = 0; 
box[x][29] = 1; 
box[x][30] = 42; 
box[x][31] = 42; 
box[x][32] = 0; 
box[x][33] = "black"; 
box[x][34] = 0; 
box[x][35] = 0; 
}
function reSetText(x){
box[x][0] = ""; 
box[x][1] = 40 + (5*x); 
box[x][2] = 50 + (5*x); 
box[x][3] = 300; 
box[x][4] = 200; 
box[x][5] = "black"; 
box[x][6] = 14; 
box[x][7] = "Arial"; 
box[x][8] = "center"; 
box[x][9] = "100%";  
box[x][10] = 3; 
box[x][11] = "white"; 
box[x][12] = "2pt solid" 
box[x][13] = "purple"; 
box[x][14] = 21; 
box[x][15] = 45; 
box[x][16] = 50; 
box[x][17] = 18; 
box[x][18] = 48; 
box[x][19] = 25; 
box[x][20] = 0; 
box[x][21] = 40; 
box[x][22] = 33; 
box[x][23] = "hidden"; 
box[x][24] = 0; 
box[x][25] = 0; 
box[x][26] = 0; 
box[x][27] = 0; 
box[x][28] = 0; 
box[x][29] = 1; 
box[x][30] = 42; 
box[x][31] = 42; 
box[x][32] = 0; 
box[x][33] ="black"; 
box[x][34] = 0; 
box[x][35] = 0; 
}
//=====================================================================
function pTxt(evt){
if(tide){
		xtLeft  = event.offsetX
		xtTop  = event.offsetY
xtLeft = xtLeft - 60
xtTop = xtTop - 10
	txtLeft = Math.round((nWidth / 36) * xtLeft)
	txtTop = Math.round((nHeight / 36) * xtTop)
bosL = parseInt(document.getElementById(tide).style.left) + txtLeft
bosT = parseInt(document.getElementById(tide).style.top) + txtTop

document.all.mainTt.style.left=xtLeft +60
document.all.mainTt.style.top=xtTop +10
document.all.mainTt.style.visibility = "visible"
AIfilter = 'on'

}
setPtxS();

}

function setPtxSC(){
document.getElementById(tide +"A").style.backgroundColor = "transparent"
}
//=================================================================
function setPtxS(){
if(tide){
x = stipTide()
document.getElementById(tide +"A").style.backgroundColor = "red"

box[x][18] = xtLeft
box[x][19] = xtTop
box[x][23] = "visible"
	if(!tempLabex[x]){
	tempLabex[x] = box[x][0].slice(0,-4)
	box[x][8] = fixLabel(tempLabex[x])
	}
document.getElementById(tide +"A").style.left = bosL
document.getElementById(tide +"A").style.top = bosT
document.getElementById(tide +"A").style.width = "auto"
document.getElementById(tide +"A").style.visibility = box[x][23]
getCoords()
fixDivider()
setTimeout("setPtxSC()",1000);
//33333333333333333333333333333333333333333333333333333333333333333333333333333333333
}}
function setPtxSxx(){
if(xtLeft){
x = stipTide()
newLabel = document.all.tLabel.value
newLabel = fixLabel(newLabel)
document.all.tLabel.value = fixLabel(newLabel)
tempLabex[x] = newLabel
box[x][8] = newLabel
box[x][23] = "visible"
document.all("box"+ x +"IA").style.width = "auto"
newLabel =  ""
getCoords()
setTimeout("setPtxSC()",2000);
	}
}


function setPtxSx(){
if(xtLeft){
x = stipTide()
PtxOp = document.all.textSizeP.selectedIndex
PtxS = document.all.textSizeP.options[document.all.textSizeP.selectedIndex].value
box[x][13] = PtxS
box[x][22] = PtxOp
getCoords()
	}
}

//=============================================================================
function setPCoSx(){
if(xtLeft){
x = stipTide()
colOp = document.all.textcolP.selectedIndex
colS = document.all.textcolP.options[document.all.textcolP.selectedIndex].text
box[x][5] = colS
box[x][21] = colOp
getCoords()
	}
}


//pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp

function rLabel(){
document.all.tLabel.value = ""
document.all.mainTt.style.visibility = "hidden"
if(document.all(tide)){
x = stipTide()
tempLabex[x] = ""
box[x][8] = ""
document.all("box"+ x +"IA").innerHTML = ""
document.all("box"+ x +"IA").style.width = 0
box[x][23] = "hidden"
	}
}
function fixLabel(label){
labz = label.length
labz1 = labz*1-1
labz2 = label.slice(0,- labz1)
labz3 = label.slice(1)
labz2 = labz2.toUpperCase()
labz4 = labz2 + labz3
return labz4
}

//=====================================================================
nuIg = 0
function setImg(nuImag){
if(document.all.shadHelp){
nuIg = nuImag 
document.all.gJobs.value = nuIg
adbox1()
}
}
function setImg2(){
oldWidth = nWidth
oldHeight = nHeight
oldLeft = xLeft
oldTop = xTop
		nWidth = document.all.aJobs.value
		nHeight = document.all.bJobs.value
		xLeft = document.all.cJobs.value
		xTop = document.all.dJobs.value
mLeft = maxL - nWidth
mTop = maxB - nHeight
uLeft = xLeft*1 + nWidth*1
uTop = xTop*1 + nHeight*1

if(uLeft < maxL){document.getElementById(tide).style.width = nWidth} else {alert ("Image cannot be placed, \n Input out of range");document.getElementById(tide).style.width = oldWidth}
if(uTop < maxB){document.getElementById(tide).style.height = nHeight} else {alert ("Image cannot be placed, \n Input out of range");document.getElementById(tide).style.height = oldHeight}
if(xLeft >1 &&  xLeft < mLeft){document.getElementById(tide).style.left = xLeft} else {document.getElementById(tide).style.left = oldLeft}
if(xTop >1 &&  xTop < mTop){document.getElementById(tide).style.top = xTop} else {document.getElementById(tide).style.top = oldTop}
document.all.aJobs.value = parseInt(document.getElementById(tide).style.width)
document.all.bJobs.value = parseInt(document.getElementById(tide).style.height)
document.all.cJobs.value = parseInt(document.getElementById(tide).style.left)
document.all.dJobs.value = parseInt(document.getElementById(tide).style.top)
		nWidth = document.all.aJobs.value
		nHeight = document.all.bJobs.value
		xLeft = document.all.cJobs.value
		xTop = document.all.dJobs.value
getCoords()
}

function sPlace() { 
document.onmouseup = release
}
var mve
var ImgHold1
var ImgHold1L
var ImgHold1T
var ImgHold1H
var ImgHold1W
var ImgHold2 
var ImgHold2L
var ImgHold2T
var ImgHold2H
var ImgHold2W

function moveDn() {
if(tide){
resetDiv()
mve = stipTide()
moveDn1()
}}
function moveDn1() { 
if(mve == 0 ){alert ("move Down maxed")} else {moveDn2()}
}
function moveDn2() { 
mve=mve*1-1
if(document.getElementById("box" + mve + "I")){
setImgHolds()
	} else {moveDn1()}
}

function moveUp() {
if(tide){
resetDiv()
mve = stipTide()
moveUp1()
}}
function moveUp1() {
if(mve == 9 ){alert ("move up maxed")} else {moveUp2()}
}

function moveUp2() {
mve=mve*1+1
if(document.getElementById("box" + mve + "I")){
setImgHolds()
	} else {moveUp1()}
} 
function setImgHolds(){
ImgHold1 = document.getElementById(tide).src
ImgHold1L = document.getElementById(tide).style.left
ImgHold1T = document.getElementById(tide).style.top
ImgHold1H = document.getElementById(tide).style.height
ImgHold1W = document.getElementById(tide).style.width
ImgHold2 = document.getElementById("box" + mve + "I").src
ImgHold2L = document.getElementById("box" + mve + "I").style.left
ImgHold2T = document.getElementById("box" + mve + "I").style.top
ImgHold2H = document.getElementById("box" + mve + "I").style.height
ImgHold2W = document.getElementById("box" + mve + "I").style.width
n = stipTide()
v = mve

boxHold0 = box[n] ; boxHold1 = box[v]; box[v] = boxHold0;  box[n] = boxHold1
 document.getElementById("box"+ n +"IA").outerHTML = "<DIV ID='box"+ n +"IA' style='position:absolute;left:" + box[n][14] + ";top:"+ box[n][15] + ";height:auto;width:auto;font-size:" + box[n][6] + ";z-index:1100;cursor:default;overflow:hidden;' UNSELECTABLE='on' contentEditable='false' >" + box[n][8] + "</DIV>"


document.getElementById(tide).src = ImgHold2
document.getElementById(tide).style.left = ImgHold2L 
document.getElementById(tide).style.top = ImgHold2T
document.getElementById(tide).style.height = ImgHold2H
document.getElementById(tide).style.width = ImgHold2W
document.getElementById("box" + mve + "I").style.left  = ImgHold1L 
document.getElementById("box" + mve + "I").style.top = ImgHold1T
document.getElementById("box" + mve + "I").style.height = ImgHold1H
document.getElementById("box" + mve + "I").style.width = ImgHold1W
document.getElementById("box" + mve + "I").src = ImgHold1
tide = "box" + mve  + "I"
fixDivider1()
}
//==================+++++++++++++TEMPLATE2=============================
var jKv = "hidden"
var tPy = "-2000"
var outP = 1
var thN = 1
var thy3
var thy4 = "boT" + thN
function FaThb(s) { 
	thy3 = "boT" + thN
	thN ++ 
if(thN == 13){
outP = 12
thN = 1
thy3 = "boT" + outP
}
Thby()
} 
function FbThb(s) { 
	thy3 = "boT" + thN
	thN -- 
if(thN == 0){
outP = 1
thN = 12
thy3 = "boT" + outP
}
Thby()
} 
function Thby(){
outP = thN
thy4 = "boT"+ thN
Spy()
}
function sThby(){
                outP = thy4.slice(3)
	thN = document.all.spVal.options[document.all.spVal.selectedIndex].value
	thy3 = "boT" + outP
	thy4 = "boT"+ thN
 Spy()
}
function Spy(){
document.all(thy3).style.visibility = "hidden"
document.all(thy4).style.visibility = "visible"
var spval = new Array("1","2","3","4","5","6","7","8","9","10","11","12","13")
var qpval = new Array("objects","animals","machines","kids","signs","music","sports","plants","buildings","food","maps","flags","seasons")

	for (var i = 0; i < spval.length; i++) { 
		if (thN == spval[i]) { 
			break 
		} 
	} 
	if (i < spval.length) { 
		catG = qpval[i]
		document.all.spVal.selectedIndex = spval[i] -1
		igP2 = catG + "/"
}}
//===================================================
var args,theImage

function loadIt(theImage) {
document.all.iMage.src = "Xi/bot/" + catG + "/" + theImage + ".gif"
document.all.pictext.value = theImage
}
//===================================================
function machines(theImage){
	var args = machines
	document.write("<a href='#'><IMG SRC='Xi/smthumb/machines/" + theImage + ".gif' onclick=setImg('" + theImage + "') border='1' alt='click for this image' style='zoom:"+ zoomX +"' UNSELECTABLE='on'>")
	for (var i = 0; i < args.length; i++){
		}
	document.write("</a>")
}
function objects(theImage){
	var args = objects
	document.write("<a href='#'><IMG SRC='Xi/smthumb/objects/" + theImage + ".gif' onclick=setImg('" + theImage + "') border='1' alt='click for this image' style='zoom:"+ zoomX +"' UNSELECTABLE='on'>")
	for (var i = 0; i < args.length; i++){
		}
	document.write("</a>")
}
function animals(theImage){
	var args = animals
	document.write("<a href='#'><IMG SRC='Xi/smthumb/animals/" + theImage + ".gif' onclick=setImg('" + theImage + "') border='1' alt='click for this image' style='zoom:"+ zoomX +"' UNSELECTABLE='on'>")
	for (var i = 0; i < args.length; i++){
		}
	document.write("</a>")
}

function plants(theImage){
	var args = plants
	document.write("<a href='#'><IMG SRC='Xi/smthumb/plants/" + theImage + ".gif' onclick=setImg('" + theImage + "') border='1' alt='click for this image' style='zoom:"+ zoomX +"' UNSELECTABLE='on'>")
	for (var i = 0; i < args.length; i++){
		}
	document.write("</a>")
}

function signs(theImage,texL,texT,texH,texW,maxT){
	var args = signs
	document.write("<a href='#'><IMG SRC='Xi/smthumb/signs/" + theImage + ".gif' onclick=setImg('" + theImage + "') border='1' alt='click for this image' style='zoom:"+ zoomX +"' UNSELECTABLE='on'>")
	for (var i = 0; i < args.length; i++){
		}
	document.write("</a>")
}
function music(theImage){
	var args = music
	document.write("<a href='#'><IMG SRC='Xi/smthumb/music/" + theImage + ".gif' onclick=setImg('" + theImage + "') border='1' alt='click for this image' style='zoom:"+ zoomX +"' UNSELECTABLE='on'>")
	for (var i = 0; i < args.length; i++){
		}
	document.write("</a>")
}
function food(theImage){
	var args = food
	document.write("<a href='#'><IMG SRC='Xi/smthumb/food/" + theImage + ".gif' onclick=setImg('" + theImage + "') border='1' alt='click for this image' style='zoom:"+ zoomX +"' UNSELECTABLE='on'>")
	for (var i = 0; i < args.length; i++){
		}
	document.write("</a>")
}
function kids(theImage){
	var args = kids
	document.write("<a href='#'><IMG SRC='Xi/smthumb/kids/" + theImage + ".gif' onclick=setImg('" + theImage + "') border='1' alt='click for this image' style='zoom:"+ zoomX +"' UNSELECTABLE='on'>")
	for (var i = 0; i < args.length; i++){
		}
	document.write("</a>")
}
function buildings(theImage){
	var args = buildings
	document.write("<a href='#'><IMG SRC='Xi/smthumb/buildings/" + theImage + ".gif' onclick=setImg('" + theImage + "') border='1' alt='click for this image' style='zoom:"+ zoomX +"' UNSELECTABLE='on'>")
	for (var i = 0; i < args.length; i++){
		}
	document.write("</a>")
}
function sports(theImage){
	var args = sports
	document.write("<a href='#'><IMG SRC='Xi/smthumb/sports/" + theImage + ".gif' onclick=setImg('" + theImage + "') border='1' alt='click for this image' style='zoom:"+ zoomX +"' UNSELECTABLE='on'>")
	for (var i = 0; i < args.length; i++){
		}
	document.write("</a>")
}
function seasons(theImage){
	var args = seasons
	document.write("<a href='#'><IMG SRC='Xi/smthumb/seasons/" + theImage + ".gif' onclick=setImg('" + theImage + "') border='1' alt='click for this image' style='zoom:"+ zoomX +"' UNSELECTABLE='on'>")
	for (var i = 0; i < args.length; i++){
		}
	document.write("</a>")
}
function maps(theImage){
	var args = maps
	document.write("<a href='#'><IMG SRC='Xi/smthumb/maps/" + theImage + ".gif' onclick=setImg('" + theImage + "') border='1' alt='click for this image' style='zoom:"+ zoomX +"' UNSELECTABLE='on'>")
	for (var i = 0; i < args.length; i++){
		}
	document.write("</a>")
}
function flags(theImage){
	var args = flags
	document.write("<a href='#'><IMG SRC='Xi/smthumb/flags/" + theImage + ".gif' onclick=setImg('" + theImage + "') border='1' alt='click for this image' style='zoom:"+ zoomX +"' UNSELECTABLE='on'>")
	for (var i = 0; i < args.length; i++){
		}
	document.write("</a>")
}
function flagSel(){
	var Flag = "<a href='#'><IMG SRC='Xi/smthumb/flags/" + this.theImage + ".gif' onclick=setImg('" + this.theImage + "')  border='1' alt='click for this image' style='zoom:"+ zoomX +"' UNSELECTABLE='on'>"
	document.all.flgImg.innerHTML = Flag
}
function flagRet(theImage){
	this.theImage = theImage
	this.flagSel = flagSel
}
var Canada = new flagRet("Canada")
var Argentina  = new flagRet("Argentina")
var Australia = new flagRet("Australia")
var Austria = new flagRet("Austria")
var Belgium = new flagRet("Belgium")
var Brazil = new flagRet("Brazil")
var Bolivia = new flagRet("Bolivia")
var Bulgaria = new flagRet("Bulgaria")
var China = new flagRet("China")
var Chile = new flagRet("Chile")
var Colombia = new flagRet("Colombia")
var Cyprus = new flagRet("Cyprus")
var Czech_Republic = new flagRet("Chech")
var Denmark = new flagRet("Denmark")
var Estonia = new flagRet("Estonia")
var Ecuador = new flagRet("Equador")
var Finland = new flagRet("Finland")
var France = new flagRet("France")
var Germany = new flagRet("Germany")
var Greece = new flagRet("Greece")
var Hungary = new flagRet("Hungary")
var Iceland = new flagRet("Iceland")
var India = new flagRet("India")
var Indonesia = new flagRet("Indonesia")
var Ireland = new flagRet("Ireland")
var Israel = new flagRet("Israel")
var Italy = new flagRet("Italy")
var Japan = new flagRet("Japan")
var Lativa = new flagRet("Latvia")
var Luxembourg = new flagRet("Luxembourg")
var Malaysia = new flagRet("Malaysia")
var Mexico = new flagRet("Mexico")
var Netherlands = new flagRet("Netherlands")
var New_Zealand= new flagRet("New-Zealand")
var Norway = new flagRet("Norway")
var Pakistan = new flagRet("Pakistan")
var Peru = new flagRet("Peru")
var Philippines = new flagRet("Philippines")
var Portugal = new flagRet("Portugal")
var Russia= new flagRet("Russia")
var Scotland= new flagRet("Scotland")
var Slovakia = new flagRet("Slovakia")
var Slovenia = new flagRet("Slovenia")
var South_Africa = new flagRet("South-Africa")
var Spain = new flagRet("Spain")
var Sweden = new flagRet("Sweden")
var Switzerland= new flagRet("Switzerland")
var Thailand = new flagRet("Thailand")
var Turkey = new flagRet("Turkey")
var United_Kingdom= new flagRet("UK")
var United_States = new flagRet("USA")
var Venezuela = new flagRet("Venezuela")
function doDisplay(flgset) {
	i = flgset.selectedIndex
	eval(flgset.options[i].text + ".flagSel()")
}

//=====================================================================
function colorImg(l){
var f
if(tide && stipTide2() == "box"){
x = stipTide()
c = box[x][11]
if(c == "white")f = 0; 
if(c == "colored")f = 1; 
if(f == 0 && l == 2){
document.all.mainCl.src = "images/color-on.gif"
box[x][11] = "colored"
f = 0
}
if(f == 1 && l == 2){
document.all.mainCl.src = "images/b-w-on.gif"
box[x][11] = "white"
f = 1
}
if(l == 1 && f == 0){document.all.mainCl.src = "images/color-off.gif"}
if(l == 1 && f == 1){document.all.mainCl.src = "images/b-w-off.gif"}
if(l == 3 && f == 0){document.all.mainCl.src = "images/b-w-on.gif"}
if(l == 3 && f == 1){document.all.mainCl.src = "images/color-on.gif"}
getCoords()
fixDivider()
}}
//onmousedown="colorImg('1')" onmouseup="colorImg('2')" onmouseout="colorImg('3')"
//=====================================================================
var mainHold
function helpOn(){
if(startUp == 1){
mainHold = document.all.mainD.innerHTML;
document.all.mainD.innerHTML = infoHelp;
for (var i = 0; i < document.getElementsByTagName("INPUT").length; i++) {
document.getElementsByTagName("INPUT")[i].disabled = true
	}
for (var i = 0; i < document.getElementsByTagName("IMG").length; i++) {
document.getElementsByTagName("IMG")[i].disabled = true
	}
for (var i = 0; i < document.getElementsByTagName("DIV").length; i++) {
document.getElementsByTagName("DIV")[i].disabled = true
	}
document.all.BODY.disabled = false
document.all.adPicture1.disabled = false
document.all.mainCn.disabled = false
document.getElementsByTagName("STYLE").disabled = false
document.all.butHold.disabled = false
document.all.helpBut.disabled = false

document.all.helpBut.outerHTML = "<input type=button ID=helpBut  value='Return' onclick=helpOff() ALT='Click to Return'>"
}}
function helpOff(){
document.all.mainD.innerHTML = mainHold;
for (var i = 0; i < document.all.length; i++) {
document.all[i].disabled = false
}
document.all.helpBut.outerHTML = "<input type=button ID=helpBut value='Help' onclick=helpOn() ALT='Click for help'>"
}

//===================================================================================
function write1Box(){
newBoxA = "box[0] = new Array(18)<br>"
newBoxA += "box[0][0] = " + box[0][0] + "<br>"
newBoxA += "box[0][1] = " + box[0][1] + "<br>"
newBoxA += "box[0][2] = " + box[0][2] + "<br>"
newBoxA += "box[0][3] = " + box[0][3] + "<br>"
newBoxA += "box[0][4] = " + box[0][4] + "<br>"
newBoxA += "box[0][5] = " + box[0][5] + "<br>"
newBoxA += "box[0][6] = " + box[0][6] + "<br>"
newBoxA += "box[0][7] = " + box[0][7] + "<br>"
newBoxA += "box[0][8] = " + box[0][8] + "<br>"
newBoxA += "box[0][9] = " + box[0][9] + "<br>"
newBoxA += "box[0][10] = " + box[0][10] + "<br>"
newBoxA += "box[0][11] = " + box[0][11] + "<br>"
newBoxA += "box[0][12] = " + box[0][12] + "<br>"
newBoxA += "box[0][13] = " + box[0][13] + "<br>"
newBoxA += "box[0][14] = " + box[0][14] + "<br>"
newBoxA += "box[0][15] = " + box[0][15] + "<br>"
newBoxA += "box[0][16] = " + box[0][16] + "<br>"
newBoxA += "box[0][17] = " + box[0][17] + "<br>"
newBoxA += "<input type=button value='close' onclick='document.all.boxShow.style.left = -1500'>"
document.all.boxShow.innerHTML  = newBoxA
document.all.boxShow.style.left = "50"
}

//===================================================================================
//Add Phone/Description Cutoffs


phwX = 845
phnDiv = ""
phw = 145
phl = 0
adOftenl = ""
phLnsX = 0
phLns = 15
function adMake() { 
if(tide){
if(!document.all.oDiv1){
phnDiv = "<DIV ID='oDiv1' STYLE='position:absolute; left:0px;top:845;padding:3' ></DIV>"
document.all.mainD.innerHTML = document.all.mainD.innerHTML + phnDiv
}
adPhone = document.all.Phone.value
adPText = document.all.adTextT.value
document.all.oDiv1.innerHTML = ""
adOftenl = ""
phLnsX = 0
phl = 0
if(adPText){
phw = adPText.length*10
phwX = 845+145-phw
 if( phw < 145){
 phw = 145
 phwX = 845
}
document.all.oDiv1.style.top = phwX
}
if(adPhone){
adMake1()
document.all.phnBut.outerHTML = "<BUTTON ID=phnBut onclick='adRemove()'></BUTTON>"
document.all.phnBut.innerHTML = "Remove Phone Tabs"
}} else { alert("Phone Tabs will not work until \n images or text are added to editor.")}}

function adMake1(){
adOften = "<DIV style='position:absolute;left:"+ phl +";top:0;width:"+ phw +";height:50;border:1pt solid black;font-family:arial;font-size:20;text-align:center;filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);' UNSELECTABLE='on'>"+ adPText +"<BR>" + adPhone + "</DIV>"
adOftenl = adOftenl + adOften
document.all.oDiv1.innerHTML = adOftenl
phLnsX = phLnsX*1+1
phl = phl*1+50
if(phLnsX < 15){
adMake1()
}
}

function adRemove(){
document.all.phnBut.outerHTML = "<BUTTON ID=phnBut onclick='adMake()'></BUTTON>"
document.all.phnBut.innerHTML = "Phone Tabs"
document.all.oDiv1.innerHTML = ""
document.all.oDiv1.outerHTML = ""
}
function newFunc(){
bc = document.all.bgSelect.options[document.all.bgSelect.selectedIndex].text
bgRSty = document.all.bgSelect.options[document.all.bgSelect.selectedIndex].value
bgISty = "url(Xi/bkgrnd/"+ bc +".gif)";
bgCSty ="white"
document.all.mainB.style.background = bgCSty + " " + bgISty + " " + bgRSty
document.all.mainB.style.background.size = "100%"
document.all.mainB.style.backgroundColor = bgCSty
//document.all.ajaxB.style.backgroundImage = bgISty
//document.all.ajaxB.style.backgroundRepeat = bgRSty
//document.all.ajaxB.style.backgroundColor = bgCSty
}

