function comboValidator(source, arguments) {
	arguments.IsValid = (parseInt(arguments.Value) > 0);
}

function DetalharProduto(CodigoProduto,PageIndex)
{
	window.location.href="detalhar_produto2.aspx?codigo="+CodigoProduto+"&pindex="+PageIndex;
}

function TabPesquisar()
{
	if (event.keyCode == 13)
	{
		window.document.all("_ctl1_btnBusca").fireEvent("onclick");
	}
}

function openWindow(url, name, left, top, width, height, status, scroll, resizable, maximized, center, modeless) {
	if (modeless)
		return (window.showModelessDialog(url, name, "dialogHeight: " + (maximized ? (screen.availHeight - 28) : height) + "px;	dialogWidth: " + (maximized	?	(screen.availWidth - 12) : width)	+	"px; dialogTop:	" + (center ? parseInt((screen.availHeight - height - 28) / 2) : top) + "; dialogLeft: " + (center ? parseInt((screen.availWidth - width - 12) / 2) : left) + "; center: " + (center ? "yes" : "no") + "; help: no; resizable: " + (resizable ? "yes" : "no") + "; scroll: " + (scroll ? "yes" : "no") + "; status: " + (status ? "yes" : "no") + ";"));
	else
		return (window.open(url, name, "channelmode=no, directories=no, location=no, width=" + (maximized	?	(screen.availWidth - 12) : width) + ", height="	+	(maximized ? (screen.availHeight - 28) : height) + ",	top="	+	(center ? parseInt((screen.availHeight - height - 28) / 2) : top) + ", left=" + (center ? parseInt((screen.availWidth - width - 12) / 2) : left) + ",	status=" + (status ? "yes" : "no") + ",	scrollbars=" + (scroll ? "yes" : "no") + ",	resizable="	+	(resizable ? "yes" : "no")));
}

function openWindowUrl(url) {
		return (window.open(url, "NONO", "channelmode=no, directories=no, location=no, status=no,scrollbars=no,resizable=no, width=300, height=500"));
}

function evalObject(objectID) {
	return (eval("window.document.all.item(\"" + objectID + "\")"));
}

function ConsultarFoto(obj)
{
	openWindow("ImageSequence.aspx?CodigoProduto="+obj,"FotoProduto","center","center", "720", "600", false, true, true, true, true, false);
}


