
	function saveItem(prod_lin, cat, subcat){
		popWindow(("/store/save_item.jsp?pid=" + prod_lin + "&cat=" + cat + "&subcat=" + subcat), 400, 400);

	}//end if
	
function popWindow(url, p_width, p_height) {
	leftPos=0
	topPos=0
	leftPos = (screen.width-p_width)/2
	topPos = (screen.height-p_height)/2

	window.open (url,'theWin','width='+p_width+',height='+p_height+',left='+leftPos+',top='+topPos+',resizeable=yes,scrollbars=yes,menubar=yes');
	
 }//end function
 
 
 	function voteNow(){
		var any_checked = false;
		var picked_value;
		//get the question lin
		var qlin = document.poll_form.qlin.value;
		var how_many_radios = document.poll_form.poll.length;
		
		for (var i=0; i< how_many_radios; i++) {
        var checked = eval("document.poll_form.poll[" + i + "].checked");
			if(checked == true){
				any_checked = true;
				picked_value = eval("document.poll_form.poll[" + i + "].value");
				
			}//end if
   	}//end for
    	
    	if(any_checked == false){
    		alert("Please choose your answer before voting!");
    		return;
    	}//end if
    	else{
    		popWindow("process_vote.jsp?qlin=" + qlin + "&vote=" + picked_value, 300,300);
    	}//end else
	
	}//end function
	
