

var isLoaded = false;
function PreLoadImage() { 
	var l = PreLoadImage.arguments.length 
    for (var i = 0; i < l; i++) 
	{
		this[i+1] = new Image();
		this[i+1].src = PreLoadImage.arguments[i];
	}	 
  isLoaded = true;
}

function ShowImage(name,img)
{
	 document.images[name].src = img
   	 return 1;
}

function top()
{
	if (parent.main)
		parent.main.location.hash = "top";
}

function mySubmit(f,url)
{
	if (url != "")
	{ 
		f.action = url
		f.submit();
	}	
}

function wOpen(myPage,w,h,s)
{
	var wnd 
	wnd = window.open(myPage,'BAT','width='+ w +',height=' + h + ',top=40,left=40,resizable,scrollbars=' + s +',toolbar=no,status=no,directories=no,menubar=no,location=no');
}

function w_Open(myPage,w,h,s)
{
	var wnd 
	wnd = window.open(myPage,'BAT','width='+ w +',height=' + h + ',top=20,left=300,scrollbars=' + s +',toolbar=no,status=no,directories=no,menubar=no,location=no');
}

function OpenWin(helpname,width,height)
{	
	var wnd
	wnd = window.open(helpname,'NT','width=' + width + ',height=' + height + ',top=100,left=300,resizable,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,location=no');
	//wnd.opener = window;
	//return 1;
}

function radioSelect(myForm, src){
	var counter = 0;
	var objLength = myForm[src].length;
	
	for (i=0; i<objLength; i++){
		if (myForm[src][i].checked){
			counter = counter +1;
		}
	}
	if (!objLength) {
		counter = (myForm[src].checked) ? 1 : 0;
	}
	return counter ;
}
