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='450' 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=CSE3292&width=450&CompaireWith1=CSESE0001776675&CompaireWith2=CSEDX0000000297&CompName1=København Mid Cap&CompName2=København Finans&yearbackhis=2&newsLang=da&issuer=8209&addCompwithName=Tilføj instrument&newsLabel=Nyheder&year1Label=1år&year2Label=2år&searchFieldText=Søg efter instrument&shareSelect=Aktie&indexSelect=Indeks&realTime=true&errorText=Vælg instrument eller klik fortryd&Styles_backgroundColor=#FFFFFF&DefaultGraph=6M&MainLineColor=0x008DCF&compwithColor=0xDE2B13&compwithColor2=0x49963C&addCompwithColor=0x000000&axisFontColor=0x000000&axisStrokeColor=0x000000&graphHeight=410&menuBarFontColor=0x808080&CompareWindowTitle=Compare with new Instrument&forceTwoYear=false&cnsTypePopup=false&Styles_bgColorFlat=false&decimalSeparator=.&thousandSeparator=&cancel=${configuration.getParameter('cancel')}&intradayTxt=${configuration.getParameter('intradayTxt')}'/>");
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='450' 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=CSE3292&width=450&CompaireWith1=CSESE0001776675&CompaireWith2=CSEDX0000000297&CompName1=København Mid Cap&CompName2=København Finans&yearbackhis=2&newsLang=da&issuer=8209&addCompwithName=Tilføj instrument&newsLabel=Nyheder&year1Label=1år&year2Label=2år&searchFieldText=Søg efter instrument&shareSelect=Aktie&indexSelect=Indeks&realTime=true&errorText=Vælg instrument eller klik fortryd&Styles_backgroundColor=#FFFFFF&DefaultGraph=6M&MainLineColor=0x008DCF&compwithColor=0xDE2B13&compwithColor2=0x49963C&addCompwithColor=0x000000&axisFontColor=0x000000&axisStrokeColor=0x000000&graphHeight=410&menuBarFontColor=0x808080&CompareWindowTitle=Compare with new Instrument&forceTwoYear=false&cnsTypePopup=false&Styles_bgColorFlat=false&decimalSeparator=.&thousandSeparator=&cancel=${configuration.getParameter('cancel')}&intradayTxt=${configuration.getParameter('intradayTxt')}'");
document.write(" </embed>");
document.write("</object>");
