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='551' 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=CSE3247&width=551&CompaireWith1=CSEDX0000001376&CompaireWith2=CSEDX0000000295&CompName1=OMX C20&CompName2=Health Care&yearbackhis=2&newsLang=en&issuer=8455&addCompwithName=Add Instrument&newsLabel=News&year1Label=1Y&year2Label=2Y&searchFieldText=Compare with&shareSelect=Share&indexSelect=Index&realTime=True&errorText=Select instrument or click Cancel&Styles_backgroundColor=#FFFFFF&DefaultGraph=2Y&MainLineColor=0x4A82A5&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=Cancel&intradayTxt=Intraday'/>");
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='551' 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=CSE3247&width=551&CompaireWith1=CSEDX0000001376&CompaireWith2=CSEDX0000000295&CompName1=OMX C20&CompName2=Health Care&yearbackhis=2&newsLang=en&issuer=8455&addCompwithName=Add Instrument&newsLabel=News&year1Label=1Y&year2Label=2Y&searchFieldText=Compare with&shareSelect=Share&indexSelect=Index&realTime=True&errorText=Select instrument or click Cancel&Styles_backgroundColor=#FFFFFF&DefaultGraph=2Y&MainLineColor=0x4A82A5&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=Cancel&intradayTxt=Intraday'");
document.write(" </embed>");
document.write("</object>");
