var W3CDOM = (document.createElement && document.getElementsByTagName);
	
function initFileUploads() 
{
	if (document.getElementById("fakeInput")) 
	{
		document.getElementById("fakeInput").value = "";
		document.careers.reset();
		document.removeChild("fakeFileUpload");
	}		
	
	if (!W3CDOM) return;
	var fakeFileUpload = document.createElement('div');
	fakeFileUpload.className = 'fakefile';
	fakeFileUpload.id = "fakeFileUpload";
	var fakeInput = document.createElement('input');
	fakeInput.id = "fakeInput";
	fakeInput.type = "text";
	fakeInput.className = "text_input";		
	fakeInput.style.height = "21px";				
	fakeInput.style.width = "225px";						
	fakeInput.style.position = "absolute";										
	fakeInput.style.top = "0px";												
	fakeFileUpload.appendChild(fakeInput);
	var image = document.createElement('img');
	image.src=base+'img/btn_browse.gif';
	image.style.position = "absolute";										
	image.style.left = "238px";	
	image.id = "imageBrowse";	
	//var image2 = document.createElement('img');
	//image2.src='../images/clear-off.gif';
	//image2.style.position = "absolute";										
	//image2.style.left = "190px";
	//image2.style.top = "80px";
	//image2.id = "imageClear";
	fakeFileUpload.appendChild(image);
	//fakeFileUpload.appendChild(image2);		
	var x = document.getElementsByTagName('input');
	for (var i=0;i<x.length;i++) 
	{
		if (x[i].type != 'file') continue;
		if (x[i].parentNode.className != 'fileinputs') continue;
		x[i].className = 'file hidden';
		var clone = fakeFileUpload.cloneNode(true);
		x[i].parentNode.appendChild(clone);
		x[i].relatedElement = clone.getElementsByTagName('input')[0];
		x[i].onchange = x[i].onmouseout = function () {
			this.relatedElement.value = this.value;
			document.getElementById("imageBrowse").src=base+'img/btn_browse.gif'				
		}
	}
	
	//document.getElementById("imageClear").onclick = new Function("initFileUploads()");		
	document.getElementById("imageBrowse").onclick = function(){document.getElementById("fileResume").click()};		
	document.getElementById("imageBrowse").onmouseover = function(){document.getElementById("imageBrowse").src=base+'img/btn_browse_r.gif'};				
	document.getElementById("imageBrowse").onmouseout = function(){document.getElementById("imageBrowse").src=base+'img/btn_browse.gif'};						
	//document.getElementById("imageClear").onmouseover = function(){document.getElementById("imageClear").src='../images/clear-on.gif'};				
	//document.getElementById("imageClear").onmouseout = function(){document.getElementById("imageClear").src='../images/clear-off.gif'};
     		
}

