// JavaScript Document
function popColorPicker(cpId,path,_top,_left){
	//preload should contain '#' hash, followed by 6 digit hex color code
	preload = document.getElementById(cpId).value;
	lastArrowPosition = document.getElementById(cpId + '_lastArrowPosition').value;
	lastBc = document.getElementById(cpId + '_lastBc').value;
	lastCLeft = document.getElementById(cpId +'_lastCLeft').value;
	lastCTop = document.getElementById(cpId+'_lastCTop').value;

	//detail factor, see class.TrueColorPicker.php
	df = 64;
	//Modify these

window.open(path + 'index.php?htmlId='+cpId+'&bc=' + lastBc + '&arrowPosition=' + lastArrowPosition + '&cLeft=' + lastCLeft + '&cTop=' + lastCTop + '&df='+df+'&preload=' + preload, null,'width=420, height=275, top='+_top+', left='+_left, true);
}
function passColorCode(cpId, clr, currentArrowsPos, currentBc, currentX, currentY){
	document.getElementById(cpId).value = clr;
	document.getElementById(cpId+'_lastArrowPosition').value = currentArrowsPos;
	document.getElementById(cpId+'_lastBc').value = currentBc;
	document.getElementById(cpId+'_lastCLeft').value = currentX;
	document.getElementById(cpId+'_lastCTop').value = currentY;
}

