<!--	//javascript

function swapdivs(div1,div2) {
	//alert("Swap divs");
	swap1 = document.getElementById(div1);
	swap2 = document.getElementById(div2);
	
	swap1.style.display = 'none';
	swap2.style.display = '';
	return false;
	
}

function swaptrs(tr1,tr2) {

	swap1 = document.getElementById(tr1);
	swap2 = document.getElementById(tr2);
	
	swap1.style.display = 'none';
	swap2.style.display = 'table-row';
	return false;

}

function openWindow(URL,W,H,TB) {
	//alert('Width is ' + width + ' and height is ' + height);
	newWindow=window.open(URL,"thenewwindow","toolbar=" + TB + ",location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + W + ",height=" + H);
	//newWindow.opener.name= "main";
	//newWindow.focus();
}


function popUp(URL,width,height,toolbar) {
			
	//alert('Width is ' + width + ' and height is ' + height);
	newWindow=window.open(URL,"thenewwindow","toolbar=" + toolbar + ",location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height + ",top="+((screen.height/2)+(height + height/2))+",left="+((screen.width/2)-(width - width/2)));
	//newWindow.opener.name= "main";
	//newWindow.focus();
		 
			
}

function confirmDelete (URL) {
        answer = confirm ("Are you sure you want to delete this record, this is permanent.");   
        if (answer) {           
                window.location.href = URL;                     
        }
}

function popUp2(URL, winName, oOverride) {
	//
	//	SYNTAX: oProp={ width:496, height:642 }; popUp2('print_me.php', 'PrintMe', oProp); return false;
	//
	var oWin = { toolbar:0, location:'no', status:'no', menubar:'no', scrollbars:'yes', resizable:'yes', width:460, height:400, top:0, left:0 };
	var str = '';
	for (prop in oOverride) { oWin[prop] = oOverride[prop]; }
	
	for (prop in oWin) {
		if (prop=='top') oWin['top'] = (screen.height/2) - (oWin['height']/2);
		if (prop=='left') oWin['left'] = (screen.width/2) - (oWin['width']/2);
		
		str += prop +'='+ oWin[prop] +',';
	}
	
	//alert(str);
	newWindow=window.open(URL, winName, str);
	//newWindow.focus();
}

function showhide(row,count) {
	//for(i=0; i<count; i++){
		which = document.getElementById(row);
		if(which.style.display == 'none') {
			which.style.display = '';
		} else{ 
			which.style.display = 'none';
		}
	//}
	return false;
}


//-->
