/* <!---
60424 SRC added global var reference (defined in calling template) driven by sq that overides the confirmation
40709 RKR changed setting of agg to 1 from 2 for confirmation of intent to aggregate clone
30805 RKR changed URL agg to clagg (clone agg) to distinguish it from var.agg->form.agg on iinput
30801 RKR added lcl param to get right input form
30731 RKR added doagg param, and idiotified instructions.
---> */

// <!--- cloneItem jscript --->
var clntext = 'COPY INVENTORY DETAILS?\n\nClick \'OK\' to copy this item\'s inventory data\nin addition to its descriptive data.\n\nClick \'Cancel\' for a blank inventory data entry form.';

// <!--- show the confirm box for the 2 questions on cloning details ; if no then we take the settings for auto-cloning --->
var jsclone_overideConfirms = 0;
if (jsclone_overideConfirms) {
	// <!--- use the settings for auto-clone --->
	var jsclone_set='0';
}else{
	// <!--- do not hide the confirmation box; assume setting to 0 (do not copy) and let user pick setting thru confirm box ok/cancel --->
	var jsclone_set='0';
}

function clone(lcl,itemno,viz,doagg) {
	// if the venue viz is less than 6 then we allow for inventory cloning thru confirm box. (user choice)
	if(viz < 6 && !jsclone_overideConfirms) {
		 if(confirm(clntext)) 
		 	jsclone_set='1';
	};
	
 window.location='iinput.cfm?mode=0&clone=1&LCl='+ lcl +'&itemno=' +itemno+ '&set=' + jsclone_set;
};
