function noop()
{
}

 function show_div(divid)
 {
    adiv = document.getElementById(divid).style;
    adiv.display= 'block';
 };

 function hide_div(divid)
 {

    var  adiv = document.getElementById(divid).style;
    adiv.display= 'none';

 };

function showCuntryInfo(id){
	for(var i = 1; i <= 7; i++){
		var country = "country"+i;
		var showCountry = id;
		if (country == showCountry){
			document.getElementById(showCountry).style.display = "block";
		}else document.getElementById(country).style.display = "none";
	}
}

function attachFile(num){		
	num = parseInt(num);
	var uploadIdPrefix = "upload";
	var removeIdPrefix = "remove";
	
	document.getElementById("num_of_file").value=num+1;
	
	var fileContainer = document.createElement("div");
	fileContainer.setAttribute("id", num);
	fileContainer.setAttribute("style", "height:30px; width:450px;");
	
	var uploadDiv = document.getElementById("fileUpload");		
	var frmEle = document.createElement("input");
	frmEle.setAttribute("type","file");		
	frmEle.setAttribute("name",uploadIdPrefix+num);
	frmEle.setAttribute("id", uploadIdPrefix+num);
	frmEle.setAttribute("style", "width:250px; float:left; height:25px;");
	
	
	var remove = document.createElement("span");
	remove.innerHTML = "Remove";
	remove.setAttribute("id", removeIdPrefix+num);
	remove.setAttribute("onclick", "javascript: return removeFile("+num+")");	
	
	/*	
	remove.addEventListener('click', 
							function dfdf (){
										//fileContainer.parentNode.removeChild(fileContainer);
										alert("asdf");
							}, 
							false );
	*/
	remove.setAttribute("style", "cursor:pointer; float:left; margin-left:20px; height:25px; text-decoration:underline;color:#6976a4");
	
	fileContainer.appendChild(frmEle);
	fileContainer.appendChild(remove);
	uploadDiv.appendChild(fileContainer);
}
function removeFile(id){
	var fileContainer = document.getElementById(id);
	fileContainer.parentNode.removeChild(fileContainer);
	/*
	remove.parentNode.removeChild(remove);
	file.parentNode.removeChild(file);
	*/
}