///////////////////////////////////////////////////////////////////////
//     This script is for use in e-StudioMax websites
//
//     It contains a couple of js files writen by other people
//     which can be copied and used. However, the jscript
//     in its entirity cannot be copied and used.
//
//     (c) e-StudioMax.com 2003. all rights reserved
///////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////
//
// Color Picker Javascript
//
///////////////////////////////////////////////////////////////////////

var ColorPickerDiv
function ShowColorPicker(which){
	var ColorPicker
	ColorPickerDiv = which
	var SM = String.fromCharCode(34)
	ColorPicker = "<table border='0' cellspacing='0' cellpadding='0' width='120'><tr><td width='60' height='210'><table style='font-family: Arial; font-size: 8pt' cellpadding='0'>"
	ColorPicker += "<tr><td bgcolor='#000000' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#000000')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#000033' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#000033')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#000066' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#000066')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#000099' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#000099')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#0000cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#0000cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#0000ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#0000ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#003300' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#003300')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#003333' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#003333')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#003366' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#003366')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#003399' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#003399')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#0033cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#0033cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#0033ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#0033ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#006600' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#006600')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#006633' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#006633')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#006666' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#006666')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#006699' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#006699')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#0066cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#0066cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#0066ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#0066ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#009900' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#009900')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#009933' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#009933')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#009966' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#009966')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#009999' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#009999')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#0099cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#0099cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#0099ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#0099ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#00cc00' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#00cc00')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#00cc33' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#00cc33')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#00cc66' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#00cc66')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#00cc99' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#00cc99')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#00cccc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#00cccc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#00ccff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#00ccff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#00ff00' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#00ff00')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#00ff33' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#00ff33')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#00ff66' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#00ff66')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#00ff99' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#00ff99')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#00ffcc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#00ffcc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#00ffff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#00ffff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#330000' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#330000')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#330033' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#330033')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#330066' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#330066')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#330099' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#330099')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#3300cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#3300cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#3300ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#3300ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#333300' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#333300')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#333333' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#333333')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#333366' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#333366')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#333399' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#333399')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#3333cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#3333cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#3333ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#3333ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#336600' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#336600')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#336633' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#336633')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#336666' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#336666')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#336699' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#336699')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#3366cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#3366cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#3366ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#3366ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#339900' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#339900')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#339933' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#339933')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#339966' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#339966')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#339999' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#339999')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#3399cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#3399cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#3399ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#3399ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#33cc00' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#33cc00')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#33cc33' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#33cc33')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#33cc66' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#33cc66')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#33cc99' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#33cc99')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#33cccc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#33cccc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#33ccff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#33ccff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#33ff00' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#33ff00')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#33ff33' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#33ff33')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#33ff66' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#33ff66')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#33ff99' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#33ff99')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#33ffcc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#33ffcc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#33ffff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#33ffff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#660000' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#660033')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#660033' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#660033')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#660066' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#660066')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#660099' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#660099')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#6600cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#6600cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#6600ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#6600ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#663300' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#663300')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#663333' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#663333')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#663366' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#663366')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#663399' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#663399')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#6633cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#6633cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#6633ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#6633ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#666600' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#666600')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#666633' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#666633')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#666666' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#666666')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#666699' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#666699')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#6666cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#6666cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#6666ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#6666ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#669900' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#669900')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#669933' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#669933')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#669966' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#669966')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#669999' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#669999')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#6699cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#6699cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#6699ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#6699ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#66cc00' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#66cc00')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#66cc33' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#66cc33')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#66cc66' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#66cc66')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#66cc99' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#66cc99')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#66cccc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#66cccc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#66ccff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#66ccff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#66ff00' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#66ff00')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#66ff33' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#66ff33')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#66ff66' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#66ff66')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#66ff99' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#66ff99')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#66ffcc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#66ffcc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#66ffff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#66ffff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr></table></td>"
	ColorPicker += "<td width='60' height='210'><table style='font-family: Arial; font-size: 8pt' cellpadding='0'>"
	ColorPicker += "<tr><td bgcolor='#990000' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#990000')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#990033' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#990033')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#990066' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#990066')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#990099' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#990099')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#9900cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#9900cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#9900ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#9900ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#993300' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#993300')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#993333' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#993333')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#993366' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#993366')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#993399' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#993399')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#9933cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#9933cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#9933ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#9933ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#996600' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#996600')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#996633' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#996633')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#996666' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#996666')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#996699' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#996699')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#9966cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#9966cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#9966ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#9966ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#999900' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#999900')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#999933' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#999933')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#999966' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#999966')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#999999' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#999999')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#9999cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#9999cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#9999ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#9999ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#99cc00' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#99cc00')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#99cc33' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#99cc33')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#99cc66' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#99cc66')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#99cc99' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#99cc99')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#99cccc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#99cccc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#99ccff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#99ccff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#99ff00' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#99ff00')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#99ff33' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#99ff33')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#99ff66' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#99ff66')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#99ff99' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#99ff99')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#99ffcc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#99ffcc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#99ffff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#99ffff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#cc0000' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc0000')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc0033' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc0033')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc0066' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc0066')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc0099' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc0099')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc00cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc00cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc00ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc00ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#cc3300' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc3300')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc3333' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc3333')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc3366' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc3366')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc3399' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc3399')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc33cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc33cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc33ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc33ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#cc6600' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc6600')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc6633' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc6633')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc6666' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc6666')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc6699' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc6699')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc66cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc66cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc66ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc66ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#cc9900' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc9933')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc9933' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc9933')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc9966' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc9966')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc9999' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc9999')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc99cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc99cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cc99ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cc99ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#cccc00' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cccc00')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cccc33' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cccc33')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cccc66' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cccc66')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cccc99' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cccc99')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#cccccc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#cccccc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ccccff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ccccff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#ccff00' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ccff00')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ccff33' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ccff33')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ccff66' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ccff66')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ccff99' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ccff99')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ccffcc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ccffcc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ccffff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ccffff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#ff0000' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff0000')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff0033' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff0033')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff0066' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff0066')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff0099' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff0099')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff00cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff00cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff00ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff00ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#ff3300' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff3300')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff3333' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff3333')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff3366' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff3366')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff3399' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff3399')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff33cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff33cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff33ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff33ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#ff6600' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff6600')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff6633' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff6633')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff6666' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff6666')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff6699' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff6699')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff66cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff66cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff66ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff66ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#ff9900' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff9900')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff9933' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff9933')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff9966' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff9966')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff9999' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff9999')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff99cc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff99cc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ff99ff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ff99ff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#ffcc00' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ffcc00')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ffcc33' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ffcc33')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ffcc66' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ffcc66')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ffcc99' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ffcc99')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ffcccc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ffcccc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ffccff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ffccff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr><tr><td bgcolor='#ffff00' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ffff00')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ffff33' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ffff33')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ffff66' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ffff66')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ffff99' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ffff99')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ffffcc' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ffffcc')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "<td bgcolor='#ffffff' height='10' style='border: 1 solid #000000'><a href='#' style='text-decoration:none' onclick=" + SM + "ReturnHex('#ffffff')" + SM + ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>"
	ColorPicker += "</tr></table></td></tr></table>"

	var divObj=eval("document.all['div" + which + "']")
	divObj.innerHTML=ColorPicker
	if (divObj.style.visibility=="hidden"){
		divObj.style.visibility="visible"
	}
}

///////////////////////////////////////////////////////////////////////
//
// Content Editing Javascript
//
///////////////////////////////////////////////////////////////////////

function ToggleTextEditable() {
	editText.contentEditable = !editText.isContentEditable;
	if (editText.isContentEditable)
		btnToggleEdit.value = 'Disable Text Editing';
	else
		btnToggleEdit.value = 'Enable Text Editing';
}

function stkComissions(stockID){
	window.open("StockComission.asp?StockID=" + stockID)
}

var txtRange
var URLID
function InsertImage(){
	if (document.selection.type == 'Text') {
		txtRange = document.selection.createRange();
		URLID = intURLID;
		if (IsInEditRange(txtRange.parentElement()) && editText.isContentEditable) {
			if (document.all['divInsertImageBox'].style.visibility=="hidden"){
				document.all['divInsertImageBox'].style.visibility="visible"
			}
		}
	}
}

function btnImageInsertClick(){
	if (document.all['txtFloatType'].value=="none"){
		txtRange.pasteHTML('<img src="/' + document.all['txtInsertImage'].value + '">');
	}else if (document.all['txtFloatType'].value=="right"){
		txtRange.pasteHTML('<img src="/' + document.all['txtInsertImage'].value + '" style="float:right">');
	}else if (document.all['txtFloatType'].value=="left"){
		txtRange.pasteHTML('<img src="/' + document.all['txtInsertImage'].value + '" style="float:left">');
	}
	if (document.all['divInsertImageBox'].style.visibility=="visible"){
		document.all['divInsertImageBox'].style.visibility="hidden"
	}
}

function btnImageCancelClick(){
	if (document.all['divInsertImageBox'].style.visibility=="visible"){
		document.all['divInsertImageBox'].style.visibility="hidden"
	}
}

function ChangeFont() {
	if (document.selection.type == 'Text') {
		var txtRange = document.selection.createRange();
		if (IsInEditRange(txtRange.parentElement()) && editText.isContentEditable) {
			var textFont = document.all('Font').options[document.all('Font').selectedIndex].value
			txtRange.pasteHTML('<FONT face="' + textFont + '">' + txtRange.text + '</FONT>');
		}
	}
}

function ChangeFontSize() {
	if (document.selection.type == 'Text') {
		var txtRange = document.selection.createRange();
		if (IsInEditRange(txtRange.parentElement()) && editText.isContentEditable) {
			var textSize = document.all('FontSize').options[document.all('FontSize').selectedIndex].value
			txtRange.pasteHTML('<FONT size="' + textSize + '">' + txtRange.text + '</FONT>');
		}
	}
}

function ChangeStyle() {
	if (document.selection.type == 'Text') {
		var txtRange = document.selection.createRange();
		if (IsInEditRange(txtRange.parentElement()) && editText.isContentEditable) {
			var heading = document.all('Style').options[document.all('Style').selectedIndex].value
			txtRange.pasteHTML('<H' + heading + '>' + txtRange.text + '</H' + heading + '>');
		}
	}
}

function ChangeTextColor(){
	if (document.selection.type == 'Text') {
		txtRange = document.selection.createRange();
		if (IsInEditRange(txtRange.parentElement()) && editText.isContentEditable) {
			ShowColorPicker('ColorPickerPContent')
		}
	}
}

function ReturnHex(which){
	if (ColorPickerDiv=='ColorPickerPContent'){
		txtRange.pasteHTML('<FONT color="' + which + '">' + txtRange.text + '</FONT>');
		var divObj=eval("document.all['div" + ColorPickerDiv + "']")
		if (divObj.style.visibility=="visible"){
			divObj.style.visibility="hidden"
		}
	}else{
		var txtObj=eval("document.all['txt" + ColorPickerDiv + "']")
		txtObj.value=which
		var divObj=eval("document.all['div" + ColorPickerDiv + "']")
		if (divObj.style.visibility=="visible"){
			divObj.style.visibility="hidden"
		}
	}
}

function ChangeTextBig() {
	if (document.selection.type == 'Text') {
		var txtRange = document.selection.createRange();
		if (IsInEditRange(txtRange.parentElement()) && editText.isContentEditable) {
			txtRange.pasteHTML('<Big>' + txtRange.text + '</Big>');
		}
	}
}

function ChangeTextSmall() {
	if (document.selection.type == 'Text') {
		var txtRange = document.selection.createRange();
		if (IsInEditRange(txtRange.parentElement()) && editText.isContentEditable) {
			txtRange.pasteHTML('<Small>' + txtRange.text + '</Small>');
		}
	}
}

function ChangeTextSup() {
	if (document.selection.type == 'Text') {
		var txtRange = document.selection.createRange();
		if (IsInEditRange(txtRange.parentElement()) && editText.isContentEditable) {
			txtRange.pasteHTML('<Sup>' + txtRange.text + '</Sup>');
		}
	}
}

function ChangeTextSub() {
	if (document.selection.type == 'Text') {
		var txtRange = document.selection.createRange();
		if (IsInEditRange(txtRange.parentElement()) && editText.isContentEditable) {
			txtRange.pasteHTML('<Sub>' + txtRange.text + '</Sub>');
		}
	}
}

function ChangeTextUpperCase() {
	if (document.selection.type == 'Text') {
		var txtRange = document.selection.createRange();
		if (IsInEditRange(txtRange.parentElement()) && editText.isContentEditable) {
			txtRange.pasteHTML('<span style="text-transform: uppercase">' + txtRange.text + '</span>')
		}
	}
}


function IsInEditRange(oParent) {
	if (document.body.id == '')
		document.body.id = '_body';
	if (oParent.id == 'editText')
		return true;
	else
		if (oParent.id == document.body.id)
			return false;
		else
			return IsInEditRange(oParent.parentElement);
}


///////////////////////////////////////////////////////////////////////
//
// PAGE EDITING JAVASCRIPT for Stock Catalogue page
//
///////////////////////////////////////////////////////////////////////
function getFrmObj(name)
{
  	if (navigator.family == 'nn4') {
  		FrmObj=eval("document.ids['" + name + "']");
  	}
  	else if (navigator.family == 'ie4') {
  		FrmObj=eval("document.all." + name);
  	}
  	else if (navigator.family == 'gecko') {
  		FrmObj=eval("document.getElementById('" + name + "')");
	}
	return FrmObj
}

// turn on and off check boxes
function chkTickBox_click(which){
	var chkObj = getFrmObj(which)
	if(chkObj.value=="on"){
		chkObj.value="off"
	}else{
		chkObj.value="on"
	}
}

function btnAddToTrolleyClick(){
	alert("You must Login or Register on this site before you can add any items to the trolley!")
}

function btnViewTrolleyNotClick(){
	alert("You must Login or Register on this site before you can view the trolley!")
}

function btnViewTrolleyClick(){
	var frmObj = getFrmObj('frmRegister');
	frmObj.action="StockCatalogue.asp?Save=ViewTrolley"
	frmObj.submit()
}


function btnAddToTrolleySaveClick(which){
	var frmObj = getFrmObj('frmRegister');
	if (frmObj.txtOrderStockQty.value>0){
		if ((frmObj.thisprice.value > TotalPurchased) && (ThisIsRewardItem=="yes")){
			alert("You have not earned enough points to get that reward. \n\nYour current reward points total is: " + TotalPurchased)
		}else{
			if ((HasReward_Products == "products") && (ThisIsRewardItem=="yes") || (HasReward_Products == "rewards") && (ThisIsRewardItem=="no")){
				alert("You cannot add rewards products to a standard order \nor products to an order with rewards in it.")
			}else{
				if (frmObj.txtOrderStockQty.value<PacketMinSize){
					alert("The quantity you have entered is below the minimum for this product!")
				}else{
					frmObj.action="StockCatalogue.asp?Save=" + which
					frmObj.submit()
				}
			}
		}
	}else{
		alert("You need to put a value greater than zero (0) in the Quantity box!")
	}
}



function btnAddVariation(){
	if ($("#DivAddVariation").css("visibility")=="visible"){
		$("#DivAddVariation").css("visibility","hidden");
	}else{
		$("#DivAddVariation").css("visibility","visible");
	}
}

function btnSaveClick3(which){
	var frmObj = getFrmObj('frmAddVariation');
	frmObj.action="StockCatalogue.asp?save=" + which;
	frmObj.submit();
}

function btnEditStockFields(){
	 //alert("here")
	if ($("#EditStockFields").css("visibility")=="visible"){
		$("#EditStockFields").css("visibility","hidden");
	}else{
		$("#EditStockFields").css("visibility","visible");
	}
}

function btnTrolley(){
	var objTrolley = getFrmObj('TrolleyDiv')
	if (objTrolley.style.visibility == "visible"){
		objTrolley.style.visibility = "hidden"
		objTrolley.style.zIndex = 0
	}else{
		objTrolley.style.visibility = "visible"
		objTrolley.style.zIndex = 200
	}
}

function OpenNewView(which,stock){
	var frmObj = getFrmObj('frmRegister');
	frmObj.action="StockCatalogue.asp?save=Goto&PageView=" + which + "&StockCode=" + stock;
	frmObj.submit();
}

function btnSaveChangesClick(){
	if ($("#editHTML").css("visibility")=="hidden"){
		var editText = $("#editText").html();
		$("#txtMyContents").html(editText);
	}
	var frmObj = getFrmObj('frmRegister');
	frmObj.action="StockCatalogue.asp?save=LongDes&PageView=Details";
	frmObj.submit();
}

function btnSaveClick2(which){
	var frmObj = getFrmObj('frmEditStockItem');
	frmObj.action="StockCatalogue.asp?save=" + which;
	frmObj.submit();
}

function GoUser(){
	var frmObj = getFrmObj('frmEdit3');
	var PageNoStr=Left(frmObj.txtSStockID.value,6)
	if(PageNoStr=="PageNo" || frmObj.txtSStockID.value==intStockID || frmObj.txtSStockID.value=="-1"){
		if(PageNoStr=="PageNo"){
			var PageNoInt=Right(frmObj.txtSStockID.value,(Len(frmObj.txtSStockID.value)-7))
			if (PageNoInt==intLastPageNo){
				window.location.href="Default.asp?" + frmObj.txtSStockID.value
			}else{
				window.location.href="Default.asp?" + frmObj.txtSStockID.value
			}
		}
	}else{
		//alert(intStockID)
		if (frmObj.txtSStockID.value!=intStockID || frmObj.txtSStockID.value!="-1"){
			frmObj.action="StockCatalogue.asp?save=Goto"
			frmObj.submit()
		}
	}
}

function Len(str)
        /***
                IN: str - the string whose length we are interested in

                RETVAL: The number of characters in the string
        ***/
        {  return String(str).length;  }


function Right(str, n)
        /***
                IN: str - the string we are RIGHTing
                    n - the number of characters we want to return

                RETVAL: n characters from the right side of the string
        ***/
        {
                if (n <= 0)     // Invalid bound, return blank string
                   return "";
                else if (n > String(str).length)   // Invalid bound, return
                   return str;                     // entire string
                else { // Valid bound, return appropriate substring
                   var iLen = String(str).length;
                   return String(str).substring(iLen, iLen - n);
                }
        }


function Left(str, n)
        /***
                IN: str - the string we are LEFTing
                    n - the number of characters we want to return

                RETVAL: n characters from the left side of the string
        ***/
        {
                if (n <= 0)     // Invalid bound, return blank string
                        return "";
                else if (n > String(str).length)   // Invalid bound, return
                        return str;                // entire string
                else // Valid bound, return appropriate substring
                        return String(str).substring(0,n);
        }


//Let Only Numbers in
function checkIt(evt) {
    evt = (evt) ? evt : window.event
    var charCode = (evt.which) ? evt.which : evt.keyCode
         if (charCode > 31 && (charCode < 48 || charCode > 57)) {
	   	if (charCode!=46 && charCode!=45){
              alert('This field only accepts numbers.')
              status = "This field accepts numbers only."
              return false
           }
         }
         status = ""
    return true
}

var ContentHelpOff="no"
function btnEditContentClick(){
	editText.contentEditable = !editText.isContentEditable;

	if ($("#EditContentTB1").css("visibility")=="visible"){
		$("#EditContentTB1").css("visibility","hidden");
		EditContent="no"
		$('#editText').css('backgroundColor','" + strPageBKColor + "');
		ContentHelpOff="no"
		if ($("#editHTML").css("visibility")=="visible"){
			swtchToHTML()
		}
	}else{
		$("#EditContentTB1").css("visibility","visible");
		EditContent="yes"
		$('#editText').css('backgroundColor','lightgrey');
		ContentHelpOff="yes"
	}
}

function btnEditContentdblClick(){
	if ($("#EditContentTB1").css("visibility")=='hidden' || $("#EditContentTB1").css("visibility")==''){
		editText.contentEditable = !editText.isContentEditable;
		$("#EditContentTB1").css("visibility","visible");
		EditContent="yes";
		$('#editText').css('backgroundColor','lightgrey');
		ContentHelpOff="yes";
	}
}

function swtchToHTML() {
	if ($("#editHTML").css("visibility")=="visible") {
		$("#editText").css("visibility","visible");
		$("#editHTML").css("visibility","hidden");
		editText.innerHTML = $("#txtMyContents").val();
		$("#texteditbut").val("HTML");

	}else {
		document.all['editText'].style.visibility="hidden"
		$("#editHTML").css("visibility","visible");
		$("#txtMyContents").html(editText.innerHTML);
		$("#texteditbut").val("text");
	}
}

var EditContent="no"
var TimerIDMain2
function HelpShow(which){
	//do nothing
}
function HelpShow2(which){
	if (which=='btnEditContent'){
		$("#tdHelp").html("Press this button to begin editing this page's contents (text and images).")
	}else if (which=='btnEditPage'){
		$("#tdHelp").html("Press this button to choose a new Page layup template or to edit the current one.")
	}else if (which=='btnEditMenu'){
		$("#tdHelp").html("Press this button to choose a new Menu layup template or to edit the current one.")
	}else if (which=='btnEditStock'){
		$("#tdHelp").html("Press this button to choose a new Stock layup template or to edit the current one.")
	}else if (which=='btnAddPage'){
		$("#tdHelp").html("Press this button to add a new page to your website.")
	}else if (which=='btnAddSubPage'){
		$("#tdHelp").html("Press this button to add a new sub page to this page (it will show up in a drop down menu below this page's menu).")
	}else if (which=='btnSecurity'){
		$("#tdHelp").html("Press this button to change this site's security settings.")
	}else if (which=='SetMicroEdit'){
		$("#tdHelp").html("Press this button to set an exact position (X:left/Y:top) for the last item you moved. You don't need to press this button unless you have changed the above figures.")
	}else if (which=='btnHits'){
		$("#tdHelp").html("Press this button to view the Site's Activity records - how many people have visited, etc.")
	}else if (which=='btnDeletePage'){
		$("#tdHelp").html("Press this button to delete this page. WARNING! Any sub pages of this page will also be deleted! This change CANNOT be undone!")
	}else if (which=='btnSave'){
		$("#tdHelp").html("You must press this button to save any changes you have made.")
	}else if (which=='txtPageOrder'){
		$("#tdHelp").html("This setting determines what order the pages are displayed in the Menu.")
	}else if (which=='txtPageLink'){
		$("#tdHelp").html("This setting determines whether this page displays it's own contents or another page's contents - i.e. is this page a full page or simply a link on the menu to another page.")
	}else if (which=='txtPageName'){
		$("#tdHelp").html("This setting determines what name is displayed on the menu for this page. NOTE: It pays to keep these names very short. If it is longer than this box, it may be too long.")
	}else if (which=='txtPageNo'){
		$("#tdHelp").html("This is the database's way of identifying this page. You can use it in the Link to Page setting on another page to link it to this page.")
	}else if (which=='btnEditURLID'){
		$("#tdHelp").html("Press this button to set this site's URL as entered above.")
	}else if (which=='btnEditLogo'){
		$("#tdHelp").html("Press this button to edit your Logo.")
	}else if (which=='btnGotoPage'){
		$("#tdHelp").html("Put in the page number you want to go to in the box then press this button.")
	}else if (which=='btnUploadImage'){
		$("#tdHelp").html("Press this button to upload a file or image to your website. WARNING! Very large files (above 500kb) may take too long to upload and be too big for anyone to download.")
	}else if (which=='btnMetaTags'){
		$("#tdHelp").html("Press this button to edit your website's Meta Tags. This is the information, including Keywords, that search engines use to 'find' your site and to rank it.")
	}else if (which=='btnEditUsers'){
		$("#tdHelp").html("Press this button to edit the details of the people who have registered on your site.")
	}else if (which=='btnAddStock'){
		$("#tdHelp").html("Press this button to add a new Stock Item to this page. This Stock Item is e-commerce enabled - allowing users to buy it from this site.")
	}else if (which=='MainMenu'){
		$("#tdHelp").html("This is the Main Menu bar. You can change it's position by dragging it with your mouse and you can edit the text and images by pressing the 'Choose Menu Design' button.")
	}else if (which=='LoginDiv'){
		$("#tdHelp").html("This is the Login control. You can change it's position by dragging it with your mouse. It has the same font settings as your Page Contents - changed by the Page Format.")
	}else if (which=='PageBanner'){
		$("#tdHelp").html("This is the Page Banner. You can change it's position by dragging it with your mouse. Choose a new page banner (or look) by pressing the 'Choose Page Format' button.")
	}else if (which=='LogoImage'){
		$("#tdHelp").html("This is where your Logo goes. You can change it's position by dragging it with your mouse. Edit it by pressing the 'Edit Logo' button.")
	}else if (which=='btnBold'){
		$("#tdHelp").html("Press this to Bold the highlighted text.")
	}else if (which=='btnItalic'){
		$("#tdHelp").html("Press this to Italic the highlighted text.")
	}else if (which=='btnUnderline'){
		$("#tdHelp").html("Press this to Underline the highlighted text.")
	}else if (which=='btnLeft'){
		$("#tdHelp").html("Press this to Left Align the highlighted text.")
	}else if (which=='btnCenter'){
		$("#tdHelp").html("Press this to Center Align the highlighted text.")
	}else if (which=='btnRight'){
		$("#tdHelp").html("Press this to Right Align the highlighted text.")
	}else if (which=='btnOrderedList'){
		$("#tdHelp").html("Press this to turn the highlighted text into an ordered list.")
	}else if (which=='btnOutdent'){
		$("#tdHelp").html("Press this to undo indents on the highlighted text.")
	}else if (which=='btnIndent'){
		$("#tdHelp").html("Press this to indent the highlighted text.")
	}else if (which=='btnHyperlink'){
		$("#tdHelp").html("Press this to create a Hyperlink on highlighted text.")
	}else if (which=='btnTextColor'){
		$("#tdHelp").html("Press this to change the color of the highlighted text.")
	}else if (which=='btnInsertImage'){
		$("#tdHelp").html("Press this to insert an image. Some text must be highlighted first. This highlighted text will be replaced by the image.")
	}else if (which=='btnSuperscript'){
		$("#tdHelp").html("Press this to Superscript highlighted text.")
	}else if (which=='btnSubscript'){
		$("#tdHelp").html("Press this to Subscript highlighted text.")
	}else if (which=='btnBigText'){
		$("#tdHelp").html("Press this to increase the highlighted text's size.")
	}else if (which=='btnSmallText'){
		$("#tdHelp").html("Press this to decrease the highlighted text's size.")
	}else if (which=='btnUppercase'){
		$("#tdHelp").html("Press this to turn the highlighted text to uppercase.")
	}else if (which=='btnSwitchHTML'){
		$("#tdHelp").html("Press this to see and edit the HTML of the page contents.")
	}else if (which=='txtPageHidden'){
		$("#tdHelp").html("Ticking this setting stops a page from being displayed on your site's Menu. It will show up in the Hidden Pages Toolbar.")
	}else if (which=='txtHideLogin'){
		$("#tdHelp").html("Ticking this setting stops the Login/Register box from being displayed on this page.")
	}

	var YMouse=window.event.clientY-140
	if (YMouse<0){
		$("#divShowHelp").css("top",0);
	}else{
		$("#divShowHelp").css("top",YMouse);
	}
	var XMouse=window.event.clientX-260
	if (XMouse<0){
		$("#divShowHelp").css("left",0);
	}else{
		$("#divShowHelp").css("left",XMouse);
	}
	clearTimeout(TimerIDMain2);
	TimerIDMain2 = setTimeout('HelpHide2()', 2500);
}

function HelpHide2(){
	//$("#divShowHelp").css(visibility='visible';
	//clearTimeout(TimerIDMain2);
}

function HelpHide(){
	//clearTimeout(TimerIDMain2);
	//$("#divShowHelp").css(visibility='hidden';
}

///////////////////////////////////////////////////////////////////////
//     This script was designed by Erik Arvidsson for WebFX
//
//     For more info and examples see: http://webfx.eae.net
//     or send mail to erik@eae.net
//
//     Feel free to use this code as lomg as this disclaimer is
//     intact.
///////////////////////////////////////////////////////////////////////

var checkZIndex = true;
var DontMove=1
var dragobject = null;
var tx;
var ty;
var xPos;
var yPos;
var MoveObject = null;
var ContentEditTBMove = null;

var ie5 = document.all != null && document.getElementsByTagName != null;

function getReal(el) {
	temp = el;

	while ((temp != null) && (temp.tagName != "BODY")) {
		if ((temp.className == "moveme") || (temp.className == "handle")){
			el = temp;
			return el;
		}
		temp = temp.parentElement;
	}
	return el;
}

function NewMouseDown(which){
	ContentEditTBMove=1
}

function moveme_onmousedown() {
	clearTimeout(TimerIDMain2);
	el = getReal(window.event.srcElement)
	xPos ="NaN"
	yPos ="NaN"

	if (el.className == "moveme" || el.className == "handle") {
		if (el.className == "handle") {
			tmp = el.getAttribute("handlefor");
			if (tmp == null) {
				dragobject = null;
				return;
			}
			else
				dragobject = eval(tmp);
		}
		else
			dragobject = el;

		//if (checkZIndex) makeOnTop(dragobject);

		ty = window.event.clientY - getTopPos(dragobject);
		tx = window.event.clientX - getLeftPos(dragobject);

		window.event.returnValue = false;
		window.event.cancelBubble = true;
	}
	else {
		dragobject = null;
	}
}

function moveme_onmouseup() {
	if(dragobject) {
		dragobject = null;
		ContentEditTBMove=null;
	}
}

function NewMouseUp(which){
	if (which!=-1){
		if (EditContent=="no"){
			MoveObject=which
			var InputTop=eval("document.all.txt" + which + "Y");
			InputTop.value=parseInt(yPos)-74;
			var InputLeft=eval("document.all.txt" + which + "X");
			InputLeft.value=parseInt(xPos);
			var ThisObj1=eval("document.all.txtMicroEditTop1")
			ThisObj1.value=parseInt(yPos)-74;
			var ThisObj2=eval("document.all.txtMicroEditLeft1")
			ThisObj2.value=parseInt(xPos);
		}
		if (ContentEditTBMove==1){
			MoveObject=which
			var InputTop=eval("document.all.txt" + which + "Y");
			InputTop.value=parseInt(yPos)-74;
			var InputLeft=eval("document.all.txt" + which + "X");
			InputLeft.value=parseInt(xPos);
			var ThisObj1=eval("document.all.txtMicroEditTop1")
			ThisObj1.value=parseInt(yPos)-74;
			var ThisObj2=eval("document.all.txtMicroEditLeft1")
			ThisObj2.value=parseInt(xPos);
		}
	}
}

function TBMouseUp(which){
	var InputTop=eval("document.all.txt" + which + "Y");
	InputTop.value=parseInt(yPos)-74;
	var InputLeft=eval("document.all.txt" + which + "X");
	InputLeft.value=parseInt(xPos);
}

function moveme_onmousemove() {
	if (ContentEditTBMove==1){
		if (dragobject) {
		  if (window.event.clientX >= 0 && window.event.clientY >= 0) {
			  dragobject.style.left = window.event.clientX - tx;
			  dragobject.style.top = window.event.clientY - ty;
			  xPos = dragobject.style.left
			  yPos = dragobject.style.top
		  }
		  window.event.returnValue = false;
		  window.event.cancelBubble = true;
	  }
	}
	if (EditContent=="no"){
	  if (dragobject) {
		  if (window.event.clientX >= 0 && window.event.clientY >= 0) {
			  dragobject.style.left = window.event.clientX - tx;
			  dragobject.style.top = window.event.clientY - ty;
			  xPos = dragobject.style.left
			  yPos = dragobject.style.top
		  }
		  window.event.returnValue = false;
		  window.event.cancelBubble = true;
	  }
    }
}

function getLeftPos(el) {
	if (ie5) {
		if (el.currentStyle.left == "auto")
			return 0;
		else
			return parseInt(el.currentStyle.left);
	}
	else {
		return el.style.pixelLeft;
	}
}

function getTopPos(el) {
	if (ie5) {
		if (el.currentStyle.top == "auto")
			return 0;
		else
			return parseInt(el.currentStyle.top);
	}
	else {
		return el.style.pixelTop;
	}
}

function makeOnTop(el) {
	var daiz;
	var max = 0;
	var da = document.all;

	for (var i=0; i<da.length; i++) {
		daiz = da[i].style.zIndex;
		if (daiz != "" && daiz > max)
			max = daiz;
	}

	el.style.zIndex = max + 1;
}

if (document.all) { //This only works in IE4 or better
	document.onmousedown = moveme_onmousedown;
	document.onmouseup = moveme_onmouseup;
	document.onmousemove = moveme_onmousemove;
}

document.write("<style>");
document.write(".moveme		{cursor: move;}");
document.write(".handle		{cursor: move;}");
document.write("</style>");
