function selectComp(select) {
//    var option = select.options[select.selectedIndex];
    var ul = document.getElementById("CompList").getElementsByTagName('ul')[0];
    var choices = ul.getElementsByTagName('input');
    for (var i = 0; i < choices.length; i++)
        if (choices[i].value == select.value) return;
    var li = document.createElement('li');
    var input = document.createElement('input');
    var text = document.createTextNode(select.title)
    input.type = 'hidden';
    input.name = 'comp[]';
    input.value = select.value;
    li.appendChild(input);
    li.appendChild(text);
    li.setAttribute('onclick', 'this.parentNode.removeChild(this);');
    li.setAttribute('onmouseover', 'this.style.backgroundImage="url(http://sutrajobs.com/API/sutradhar/image/site/minus_circle.png)";');
    li.setAttribute('onmouseout', 'this.style.backgroundImage="url(http://sutrajobs.com/API/sutradhar/image/site/_remove.gif)";');
    ul.appendChild(li);
}

function selectAll(field){
//    var copytoclip=1
    var val = field;
//    var val = eval("document."+field);
    val.focus();
    val.select();
//    if (document.all&&copytoclip==1){
//        therange=val.createTextRange()
//        therange.execCommand("Copy")
//        window.status="Contents highlighted and copied to clipboard!"
//        setTimeout("window.status=''",1800)
//    }

}
