// JavaScript Document

//To open a new window smaller than the screen size.   
var newWindow;
function openNewWindow(url)
{
	newWindow=window.open(url,'mediumWindow','width=800,height=500,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes,location=yes');
	if (window.focus) {newWindow.focus()}
}

function test()
{
	var n  = document.getElementById("names");
	var str = n.value;
	//alert(str.length);
	var count = 0;
	for (var i =0;i <str.length ;i = i +1)  
	{
		if(str[i]== ",")
		count++;
	}
	count++;
	if(str.length == 0)
	{
		count = 0;
	}
	//alert(count);
	var number  = document.getElementById("num");
	var tot = document.getElementById("total");
	tot.value = count * 50;
      number.value=count;
	number.visible="false";
	//alert(n.value);
}

function test1()
{
   var n  = document.getElementById("names");
	var str = n.value;
	//alert(str.length);
	var count = 0;
	for (var i =0;i <str.length ;i = i +1)  
	{
		if(str[i]== ",")
		count++;
	}
	count++;
	if(str.length == 0)
	{
		count = 0;
	}
	//alert(count);
	var number  = document.getElementById("num");
	var tot = document.getElementById("total");
	tot.value = count * 25;
      number.value=count;
	number.visible="false";
	//alert(n.value);

}

function test2()
{
  var n  = document.getElementById("names");
	var str = n.value;
	//alert(str.length);
	var count = 0;
	for (var i =0;i <str.length ;i = i +1)  
	{
		if(str[i]== ",")
		count++;
	}
	count++;
	if(str.length == 0)
	{
		count = 0;
	}
	//alert(count);
	var number  = document.getElementById("num");
	var tot = document.getElementById("total");
	tot.value = count * 15;
      number.value=count;
	number.visible="false";
	//alert(n.value);
}