function popupWhyCPS(){
  window.open('../popupwhycps.html','popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=600,height=275,screenX=150,screenY=150,top=150,left=150')
}
function popupMoreCPS(){
  window.open('../popupcpsinfo.html','popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=600,height=525,screenX=150,screenY=150,top=150,left=150')
}
function ViewOrder(strPage){
   var height = 800;
   var width = 500;
   var top = 0;
   var left = 0;

   var url = strPage;
   var properties = 'scrollbars=yes,height=' + height + ',width=' + width+ ',top=' + top+ ',left=' + left;
   window.open(url,'',properties);
}

function CheckAcc()
{
	len = document.frmProduct.accpid.length;
	var i=0;
	if (len == null)
	{
		if (document.frmProduct.allincacc.checked)
		{
			document.frmProduct.accpid.checked=1;
		}
		else
		{
			document.frmProduct.accpid.checked=0;
		}
	}
	else
	{
		if (document.frmProduct.allincacc.checked)
		{
			for( i=0 ; i<len ; i++) 
			{
				document.frmProduct.accpid[i].checked=1;
			}
		}
		else
		{
			for( i=0 ; i<len ; i++) 
			{
				document.frmProduct.accpid[i].checked=0;
			}
		}
	}
}
function CheckAccAll()
{
	var checkbox_choices = 0;
	len = document.frmProduct.accpid.length;
	if (len == null)
	{
		if (document.frmProduct.accpid.checked)
		{
			document.frmProduct.allincacc.checked=1;
		}
		else
		{
			document.frmProduct.allincacc.checked=0;
		}
	}
	else
	{
		for (counter = 0; counter < len; counter++)
		{
			if (document.frmProduct.accpid[counter].checked)
			{ 
				checkbox_choices = checkbox_choices + 1; 
			}
		}
		//alert(checkbox_choices);
		if (checkbox_choices == len)
		{
			document.frmProduct.allincacc.checked = 1;
		}
		else
		{
			document.frmProduct.allincacc.checked = 0;
		}
	}
}
