function showAlert(msg){
	alert(msg);
}


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("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' id='NasdaqOmxFlash' width='580' height='410' codebase='https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0'>");
document.write("  <param name='flashVars' value='instrumentId=HEX24301&width=580&CompaireWith1=HEXFI0008900212&CompaireWith2=HEXFI0008901244&CompName1=Helsinki 25&CompName2=OMX Helsinki Industrials_PI&yearbackhis=2&newsLang=fi&issuer=15748&addCompwithName=Vertaa&newsLabel=Uutiset&year1Label=1Y&year2Label=2Y&searchFieldText=Vertaa&shareSelect=Osake&indexSelect=Indeksi&realTime=True&errorText=Valitse instrumentti tai klikkaa&Styles_backgroundColor=#6F7073&DefaultGraph=6M&MainLineColor=0xFFFFFF&compwithColor=0xDAAD6A&compwithColor2=0x7796B2&addCompwithColor=0x000000&axisFontColor=0xFFFFFF&axisStrokeColor=0x000000&graphHeight=310&menuBarFontColor=0xFFFFFF&CompareWindowTitle=Vertaa osakkeeseen tai indeksiin&forceTwoYear=false&cnsTypePopup=false&Styles_bgColorFlat=true&decimalSeparator= &thousandSeparator=,&cancel=Peruuta&intradayTxt=T&auml;n&auml;&auml;n'/>");
document.write("  <param name='movie' value='http://www.nasdaqomxnordic.com/static/ir/shareChart/shareChart.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/shareChart/shareChart.swf' quality='high' bgcolor='#ffffff'");
document.write("   width='580' height='410' name='AdvancedGraph' align='middle'");
document.write("    play='true'");
document.write("    loop='false'");
document.write("    allowScriptAccess='always'");
document.write("    wmode='transparent'");
document.write("    type='application/x-shockwave-flash'");
document.write("    flashVars='instrumentId=HEX24301&width=580&CompaireWith1=HEXFI0008900212&CompaireWith2=HEXFI0008901244&CompName1=Helsinki 25&CompName2=OMX Helsinki Industrials_PI&yearbackhis=2&newsLang=fi&issuer=15748&addCompwithName=Vertaa&newsLabel=Uutiset&year1Label=1Y&year2Label=2Y&searchFieldText=Vertaa&shareSelect=Osake&indexSelect=Indeksi&realTime=True&errorText=Valitse instrumentti tai klikkaa&Styles_backgroundColor=#6F7073&DefaultGraph=6M&MainLineColor=0xFFFFFF&compwithColor=0xDAAD6A&compwithColor2=0x7796B2&addCompwithColor=0x000000&axisFontColor=0xFFFFFF&axisStrokeColor=0x000000&graphHeight=310&menuBarFontColor=0xFFFFFF&CompareWindowTitle=Vertaa osakkeeseen tai indeksiin&forceTwoYear=false&cnsTypePopup=false&Styles_bgColorFlat=true&decimalSeparator= &thousandSeparator=,&cancel=Peruuta&intradayTxt=T&auml;n&auml;&auml;n'");
document.write(" </embed>");
document.write("</object>");
