//动态添加或删除新的文本框
var num=0;
function add(){
	var html="<input type='text' value='' name='pollItem[]' id='up"+num+"'><a href='#' onClick='javascript:del("+num+");' id='delBtn_"+num+"'>删除此项</a><br/>"; 
	new Insertion.Top('addInput',html);
	num=num+1;
}
function del(n){
	var node=document.getElementById("up"+n);
	var delButton=document.getElementById("delBtn_"+n);
	if(node){
		node.parentNode.removeChild(node);
		delButton.parentNode.removeChild(delButton);
	}
}

//投票的弹出窗口函数
function openWindow(height,width){
    if(height==null) height=380;
    if(width==null) width=320;
	window.open('','newWindow','height='+height+', width='+width+',top=100,left=100,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no');	
}

function openWindowView(url,height,width){
    if(height==null) height=380;
    if(width==null) width=320;
	window.open(url,'view','height='+height+', width='+width+',top=100,left=100,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no');	
}


