// combo_url for combobox
var combo_url = "";

// prevent cross-site script attacking

combo_boxWidth = unescape(combo_boxWidth.toString());
combo_boxWidth = combo_boxWidth.replace(/</g, '&lt;');
combo_boxWidth = combo_boxWidth.replace(/>/g, '&gt;');

combo_boxHeight = unescape(combo_boxHeight.toString());
combo_boxHeight = combo_boxHeight.replace(/</g, '&lt;');
combo_boxHeight = combo_boxHeight.replace(/>/g, '&gt;');

combo_lang = unescape(combo_lang.toString());
combo_lang = combo_lang.replace(/</g, '&lt;');
combo_lang = combo_lang.replace(/>/g, '&gt;');

combo_itemsCount = unescape(combo_itemsCount.toString());
combo_itemsCount = combo_itemsCount.replace(/</g, '&lt;');
combo_itemsCount = combo_itemsCount.replace(/>/g, '&gt;');

// test some variables

if(parseInt(combo_boxWidth) < 160 || parseInt(combo_boxWidth) == "NaN") combo_boxWidth = 160;
if(parseInt(combo_boxWidth) > 500) combo_boxWidth = 500;

if(parseInt(combo_boxHeight) < 160 || parseInt(combo_boxHeight) == "NaN") combo_boxHeight = 160;
if(parseInt(combo_boxHeight) > 1000) combo_boxHeight = 1000;
	
if(parseInt(combo_itemsCount) < 1 || parseInt(combo_itemsCount) == "NaN") combo_itemsCount = 1;
if(parseInt(combo_itemsCount) > 50) combo_itemsCount = 50;

if(combo_lang != "en") combo_lang = "hr";
		
// create combo_url
combo_url = "http://www.stipendije.info/combo/combo.swf?combo_boxWidth=" + combo_boxWidth + "&combo_boxHeight=" + combo_boxHeight + "&combo_itemsCount=" + combo_itemsCount + "&combo_lang=" + combo_lang;

// output content

if(combo_url != "")
{
	document.write("<div>");
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' ");
	document.write("width='" + combo_boxWidth + "' height='" + combo_boxHeight + "'>");
		document.write("<param name='movie' value='" + combo_url + "' />");
		document.write("<param name='wmode' value='transparent'>");		
		document.write("<!--[if !IE]>-->");
		document.write("<object type='application/x-shockwave-flash' ");
			document.write("width='" + combo_boxWidth + "' height='" + combo_boxHeight + "' ");
			document.write("wmode='transparent' ");			
			document.write("data='" + combo_url + "'>");
			document.write("<!--<![endif]-->");

				// alternative content
				document.write("<div style='width:" + combo_boxWidth + "px; height:" + combo_boxHeight + "px; background-color:#a20d0d; text-align:center; color: #EEEEEE; font-family: Arial, Helvetica; font-size: ");
				
				if(parseInt(combo_boxWidth) > 200 || parseInt(combo_boxHeight) > 200) document.write("11px;'>");
				else document.write("9px;'>");
				
					document.write("<div style='width:100%; height:17px;'>");
						document.write("<a href='http://www.stipendije.info' target='_blank' alt='Stipendije.info'>Stipendije.info</a>");
					document.write("</div>");
					document.write("<div style='width:100%;'><br />");
						// new line
						if(parseInt(combo_boxHeight) > 220) document.write("<br />");
						document.write("<p style='padding: 0px 7px;'>Za pregledavanje sadržaja potreban je Adobe Flash 9.0.0 plugin. Možete ga preuzeti <a style='color:#FFFFFF; text-decoration:underline;' href='http://www.adobe.com/go/getflashplayer' target='_blank'>ovdje</a></p>");
					document.write("</div>");	
				document.write("</div>");

		document.write("<!--[if !IE]>-->");
		document.write("</object>");
		document.write("<!--<![endif]-->");
	document.write("</object>");
	document.write("</div>");
}