var click_dis = false;

function roll(item) {
	var pom;
	if (item.classNameRoll) {
		pom = item.classNameRoll;
		item.classNameRoll = item.className;
		item.className = pom;
	} else {
		item.classNameRoll = item.className;
		item.className = 'active';
	}
}

function clickme(item) {
	var pom;
	if (click_dis)
	{
		click_dis = false;
		return;
	}
	if (item.className == item.classNameRoll) {
		item.classNameRoll = item.classNameClick;
		item.className = 'active';
	} else {
		item.classNameClick = item.classNameRoll
		item.className = 'click';
		item.classNameRoll = 'click';
	}
}


function OpenPage(url, target, width, height) {
	if (!width) width=710;
	if (!height) height=600;
	
	left = (window.screen.width / 2) - (width / 2);
	topi = (window.screen.height / 2) - (height / 2);
	
	options = 'margin=5,scrollbars=yes,toolbar=0,resizable=yes,menubar=0'+(width>0&&height>0?',top=' + topi + ',left=' + left + ',width=' + width + ',height=' + height:'');
	win = window.open(url, target, options);    
	win.focus();
	return ('object' == typeof(win)) ? false : true;
}

function Insert(id,url)
{
	window.opener.location.href = url + '&addProductId='+id+'&addProductCount='+document.getElementById('count_'+id).value;
//  document.getElementById('count_'+id).selectedIndex=0;
	location.href=location.href;
//	window.close();
	return false;
}

function InsertZ(id,url)
{
	window.location.href = url + '&addProductId='+id+'&addProductCount='+document.getElementById('count_'+id).value;
//  document.getElementById('count_'+id).selectedIndex=0;
//	location.href=location.href;
	return false;
}




