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("<script type='text/javascript'>var head = document.getElementsByTagName('head')[0];script = document.createElement('script');script.src = 'http://www.omxnordicexchange.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' width='590' height='410' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0'>");
document.write("  <param name='flashVars' value='instrumentId=SSE40347&width=590&CompaireWith1=SSESE0000742793&CompaireWith2=SSESE0001775669&CompName1=Machinery_PI&CompName2=Small Cap SEK PI&yearbackhis=2&newsLang=en&issuer=20352&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=6M&MainLineColor=0x008DCF&compwithColor=0xDE2B13&compwithColor2=0x49963C&addCompwithColor=0x000000&axisFontColor=0x000000&axisStrokeColor=0x000000&graphHeight=410&menuBarFontColor=0x808080&CompareWindowTitle=${configuration.getParameter('CompareWindowTitle')}&forceTwoYear=${configuration.getParameter('forceTwoYear')}&cnsTypePopup=${configuration.getParameter('cnsTypePopup')}&Styles_bgColorFlat=${configuration.getParameter('Styles_bgColorFlat')}&decimalSeparator=${configuration.getParameter('decimalSeparator')}&thousandSeparator=${configuration.getParameter('thousandSeparator')}&cancel=${configuration.getParameter('cancel')}&intradayTxt=${configuration.getParameter('intradayTxt')}'/>");
document.write("  <param name='movie' value='http://www.omxnordicexchange.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.omxnordicexchange.com/static/ir/shareChart/shareChart.swf' quality='high' bgcolor='#ffffff'");
document.write("   width='590' 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=SSE40347&width=590&CompaireWith1=SSESE0000742793&CompaireWith2=SSESE0001775669&CompName1=Machinery_PI&CompName2=Small Cap SEK PI&yearbackhis=2&newsLang=en&issuer=20352&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=6M&MainLineColor=0x008DCF&compwithColor=0xDE2B13&compwithColor2=0x49963C&addCompwithColor=0x000000&axisFontColor=0x000000&axisStrokeColor=0x000000&graphHeight=410&menuBarFontColor=0x808080&CompareWindowTitle=${configuration.getParameter('CompareWindowTitle')}&forceTwoYear=${configuration.getParameter('forceTwoYear')}&cnsTypePopup=${configuration.getParameter('cnsTypePopup')}&Styles_bgColorFlat=${configuration.getParameter('Styles_bgColorFlat')}&decimalSeparator=${configuration.getParameter('decimalSeparator')}&thousandSeparator=${configuration.getParameter('thousandSeparator')}&cancel=${configuration.getParameter('cancel')}&intradayTxt=${configuration.getParameter('intradayTxt')}'");
document.write(" </embed>");
document.write("</object>");