//*****************************************************************************************
//** This function will enter 'On File Logo' if 'Logo On File' is selected from the Browser
//*****************************************************************************************

function setVal1(){
	document.form1.imp_logo.text='On File Logo';
	document.form1.imp_logo.value='On File Logo';
}

//*****************************************************************************************
//** This function will enter 'No Logo' if 'No Logo' option is selected from the Browser
//*****************************************************************************************

function setVal2(){
	document.form1.imp_logo.text='No Logo';
	document.form1.imp_logo.value='No Logo';
}

//*****************************************************************************************
//** This function checks which selection has been made 
//*****************************************************************************************

function checkSelectionLogoTest(obj) {
	//var oBrowser = (navigator.appName.indexOf("Microsoft") != -1);
	var oName = obj.name;
	var oValue = "";
	
	oValue = document.form1.imp_logo_radio.value;
	
}

//*****************************************************************************************
//** This function checks whether there was a change in logo selection 
//*****************************************************************************************

function checkChangeLogoTest(){
	var oValue = "";

	oValue = document.form1.imp_logo.value;
	
}

//*****************************************************************************************
//** IF no logo is selected then this function will show alert message to the users 
//*****************************************************************************************

function checkEmptyLogoSelection(){
	//var oPlatform = navigator.platform;
	var selectval = "";

	selectval = document.form1.imp_logo.value;
	//return true; // NEW LINE
	
	/*if (selectval == ''){
		alert('Please make a logo selection.');
		return false;
	}
	else{
		return true;
	}*/
	if (selectval == "No Logo"){		
		document.form1.imp_logo.text='No Logo';
		document.form1.imp_logo.value='No Logo';
		return true;
	}else{		
		return true;
	}
}

//*****************************************************************************************
//** This function handles all kit-on-fly functionalities
//*****************************************************************************************

function checkSelectionLogoKit(obj){
	var selectval = "";
	
		for(i=0;i<document.form1.imp_logo_radio.length;i++){
			if(document.form1.imp_logo_radio[i].checked){
			selectval = document.form1.imp_logo_radio[i].value;
			} 
		} 
	
		switch(selectval){
		
			case 'Upload Logo':
				if(document.form1.kittedLogo.value != 'yes'){						
					productNumber = ++productNumber;	//updating the global variable
					document.form1.productid.value = addProdID(document.form1.productid.value,document.form1.UploadLogoID.value);
					document.form1.kittedLogo.value = 'yes'; //set the kitted flag to prevent repeat submission of the same kit item.  
				} 
				else{ 		
					document.form1.kittedLogo.value = ''; //set the kitted flag			
					productNumber = --productNumber	//updating the global variable
					document.form1.productid.value = remProdID(document.form1.productid.value,document.form1.UploadLogoID.value);
					document.form1.productid.value = remProdID(document.form1.productid.value,document.form1.OnFileLogoID.value);
				} 
				break;
			
			case 'On File Logo':
				if(document.form1.kittedLogo.value != 'yes'){		
					productNumber = ++productNumber;	//updating the global variable
					document.form1.productid.value = addProdID(document.form1.productid.value,document.form1.OnFileLogoID.value);
					document.form1.kittedLogo.value = 'yes'; //set the kitted flag to prevent repeat submission of the same kit item.   
				}
				else{ 
					document.form1.kittedLogo.value = ''; //set the kitted flag				
					productNumber = --productNumber	//updating the global variable
					document.form1.productid.value = remProdID(document.form1.productid.value,document.form1.OnFileLogoID.value);
					document.form1.productid.value = remProdID(document.form1.productid.value,document.form1.UploadLogoID.value);
				} 
				break;
				
			case 'No Logo':
				if(document.form1.kittedLogo.value != 'yes'){							
				}else{ 		
					document.form1.kittedLogo.value = ''; //set the kitted flag		
					productNumber = --productNumber	//updating the global variable
					document.form1.productid.value = remProdID(document.form1.productid.value,document.form1.UploadLogoID.value);
					document.form1.productid.value = remProdID(document.form1.productid.value,document.form1.OnFileLogoID.value);
				}
				break;
		
			default:
		
				break;
			}		// End of Switch	
		checkKitID();		
		//alert('\n' + 'selectval=' + selectval + '\n' + 'productNumber=' + productNumber + '\n' + 'prodid=' + document.form1.productid.value);
	
	return true;
	
} // end function
	
//*******************************************

//oImprint.checkEmptyLogoSelection =checkEmptyLogoSelection;
//oImprint.checkSelectionLogoKit = checkSelectionLogoKit;

personal.checkEmptyLogoSelection =checkEmptyLogoSelection;
personal.checkSelectionLogoKit = checkSelectionLogoKit;




