function postCSV(csvString){
	post_to_url('http://ir.nasdaqomxnordic.com/OpenInEXcel', csvString);
	return "success";
}

function post_to_url(path, csvString) {
	method = "post"; // Set method to post by default, if not specified.
	var form = document.createElement("form");
	form.setAttribute("method", method);
	form.setAttribute("action", path);
	var hiddenField = document.createElement("input");
	hiddenField.setAttribute("type", "hidden");
	hiddenField.setAttribute("name", "csvString");
	hiddenField.setAttribute("value", csvString);
	form.appendChild(hiddenField);
	document.body.appendChild(form); // Not entirely sure if this is necessary
	form.submit();
}

document.write("<script type='text/javascript'>var head = document.getElementsByTagName('head')[0];script = document.createElement('script');script.src = 'http://www.nasdaqomxnordic.com/static/ir/JavaScriptFunctions/flashCheck.js';script.type = 'text/javascript';head.appendChild(script);</script>");
document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' id='NasdaqOmxFlash' style='height:1000px;width:600px;' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0'>");
document.write("<param name='flashVars' value='company_id=HEX24298&company_idB=&updated_text=&app_height=1000&app_width=600&shareHoldersText=Omistajat&shareAText=Osakkeet&shareBText=&changeText=Muutos&include_custodians=false&max_shareholders=50&headline=Suurimmat osakkeenomistajat&headline_font_color=0xffffff&font_family=Verdana&font_color=0x000000&summary_headline=&summary_largest_text=&summary_all_text=&summary_others_text=&summary_custodian_text=&display_pie_chart=true&viewSummary=true&pieColor1=0xB4B4B4&pieColor2=0xF75900&pieColor3=0xDCDCDC&TitlebgColor=0xFF7900&largestText=suurinta omistajaa&custodianText=&nonCustodiansText=&othersText=Muut&totalText=Yhteens&auml;&showProcentA=true&showProcentB=true&showTotalShares=false&showProcentVotes=false&showChangeA=true&showChangeB=true&showProcentShares=false&totalShares=Total Shares&totalVotesPc=% votes&totalSharesPc=% of shares&summaryTxt=Yhteenveto&disclamerTxt=Omistajatiedot p&auml;ivitet&auml;&auml;n kerran kuukaudessa.&fontFamily=Verdana&fontSize=10&fontColor=0x000000&widthCorrection=&totalVotesACorrection=&totalVotesBCorrection=&aVoteMulti=&bVoteMulti=&loadexcel=&boxBGColor1=0xF7F7F7&boxBGColor2=0xF3F3F3&comp_id=LEM&headRowBGColor=&verticalGridLineColor=&horizontalGridLineColor=&columnsByVotes=false&maxShareholderDDText=&archiveShareholderDDText=&dataFileFormat=${configuration.getParameter('dataFileFormat')}'/>");
document.write("  <param name='movie' value='http://www.nasdaqomxnordic.com/static/ir/shareholders/ShareHoldersApp.swf' />");
document.write("  <param name='quality' value='high' />");
document.write("  <param name='bgcolor' value='#ffffff' />");
document.write("  <param name='wmode' value='transparent' />");
document.write("  <param name='allowScriptAccess' value='always' />");
document.write("  <embed src='http://www.nasdaqomxnordic.com/static/ir/shareholders/ShareHoldersApp.swf' quality='high' wmode='transparent' bgcolor='#ffffff'");
document.write("    name='shareholders' style='height:1000px;width:600px;' align='middle'");
document.write("    play='true'");
document.write("    loop='false'");
document.write("    AllowScriptAccess='always'");
document.write("    type='application/x-shockwave-flash'");
document.write("    flashVars='company_id=HEX24298&company_idB=&updated_text=&app_height=1000&app_width=600&shareHoldersText=Omistajat&shareAText=Osakkeet&shareBText=&changeText=Muutos&include_custodians=false&max_shareholders=50&headline=Suurimmat osakkeenomistajat&headline_font_color=0xffffff&font_family=Verdana&font_color=0x000000&summary_headline=&summary_largest_text=&summary_all_text=&summary_others_text=&summary_custodian_text=&display_pie_chart=true&viewSummary=true&pieColor1=0xB4B4B4&pieColor2=0xF75900&pieColor3=0xDCDCDC&TitlebgColor=0xFF7900&largestText=suurinta omistajaa&custodianText=&nonCustodiansText=&othersText=Muut&totalText=Yhteens&auml;&showProcentA=true&showProcentB=true&showTotalShares=false&showProcentVotes=false&showChangeA=true&showChangeB=true&showProcentShares=false&totalShares=Total Shares&totalVotesPc=% votes&totalSharesPc=% of shares&summaryTxt=Yhteenveto&disclamerTxt=Omistajatiedot p&auml;ivitet&auml;&auml;n kerran kuukaudessa.&fontFamily=Verdana&fontSize=10&fontColor=0x000000&widthCorrection=&totalVotesACorrection=&totalVotesBCorrection=&aVoteMulti=&bVoteMulti=&loadexcel=&boxBGColor1=0xF7F7F7&boxBGColor2=0xF3F3F3&comp_id=LEM&headRowBGColor=&verticalGridLineColor=&horizontalGridLineColor=&columnsByVotes=false&maxShareholderDDText=&archiveShareholderDDText=&dataFileFormat=${configuration.getParameter('dataFileFormat')}'");
document.write(" </embed>");
document.write("</object>");
