//pop up script
function popwin(URL, name, w, h) {
	pop_window = window.open(URL,name,'width=' + w + ',height=' + h + ',left=100,screenX=100,top=100,screenY=100,fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes');
	self.name = "main";
	if (window.focus) {
		setTimeout('pop_window.focus();',1);
	}
}

//-->

//check message status

function testStatus0(line,item,rows){

window.open('message_detail.php?&lineID=' + line + '&itemID=' + item + '&messRow=' + rows + '&action=add' , 'message' , 'width=400, height=360,left=100,screenX=100,top=100,screenY=100,fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes' );
	self.name = "main";


}

function testStatus1(line,item,rows){

if(document.frmMess.row1.value == 1)
alert("The first message is set to Every Visit.\nPlease change to First Visit Only before adding a new message");



else{

window.open('message_detail.php?&lineID=' + line + '&itemID=' + item + '&messRow=' + rows + '&action=add' , 'message' , 'width=400, height=360,left=100,screenX=100,top=100,screenY=100,fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes' );
	self.name = "main";

	}
}

function testStatus2(line,item,rows){

if(document.frmMess.row2.value == 4)
alert("A message is set to Every Subsequent Visit.\nPlease change before adding a new message");



else{

window.open('message_detail.php?&lineID=' + line + '&itemID=' + item + '&messRow=' + rows + '&action=add' , 'message' , 'width=400, height=360,left=100,screenX=100,top=100,screenY=100,fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes' );
	self.name = "main";

	}

}

