function embedPageIFrame(source)
{
	document.write( '<iframe name="content" src="' + source + '" width="100%" height="100%" scrolling="auto" frameborder="none"></iframe> ' );
}

function embedFlashObject(asset, height, width, color, xmlPath, stylesPath)
	{
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ');
		document.write('height="' + height + '"');
		document.write('width="' + width + '">');
		document.write('<param name="src" value="' + asset + '">');
		document.write('<param name="allowScriptAccess" value="sameDomain" />');
		document.write('<param name="FlashVars" value="xmlPath=' + xmlPath + '&stylesPath=' + stylesPath + '" />');
		document.write('<param name="align" value="middle">');
		document.write('<param name="quality" value="high">');
		document.write('<param name="bgcolor" value="' + color + '">');
		document.write( '<embed ' );
		document.write( '  src="' + asset + '" ' );
		document.write( '  name="' + name + '"' );
		document.write( '  height="' + height + '" ' );
		document.write( '  width="' + width + '" ' );
		document.write( '  align="middle" ' );
		document.write( '  quality="high" ' );
		document.write( '  allowScriptAccess="sameDomain" ' );
		document.write( '  FlashVars="xmlPath=' + xmlPath + '&stylesPath=' + stylesPath + '"');
		document.write( '  scale="aspect" ' );
		document.write( '  pluginspage="http://www.macromedia.com/go/getflashplayer" ' );
		document.write( '  bgcolor="' + color + '" ' );
		document.write( '  type="application/x-shockwave-flash">' );
		document.write( '</embed>' );
		document.write('</object>');
	}


function downloadFile() {
	// get hidden IFrame
	// getusername
	// getpassword
	var getHiddenFrame=document.getElementById("hiddenFrame");
	var getName=document.getElementById("txtName").value;
	var getPassword=document.getElementById("txtPassword").value;

	if (getName.length == 0) {
		alert('Name field must be entered');
	}else if (getPassword.length == 0) {
		alert('Password field must be entered'); 
	}else {
		// pass information to IFRAME
		// show link
		getHiddenFrame.src="/Clients/GetInfo/tabid/61/Default.aspx?name="+getName+"&pass="+getPassword;
	}
}

function showFile(fileString) {
	var getResponseLayer=document.getElementById("fileResponse");
	getResponseLayer.style.display="inline";
	if (fileString == "none") {
		// record does not exist
		getResponseLayer.innerHTML="No file exists or incorrect password. Please contact administrator";
	}else{
		// record does exist
		getResponseLayer.innerHTML="File: <strong><a href='/Portals/0/Upload/"+fileString+"'>"+fileString+"</a></strong>";
		
	}
}
