function getOASScript(serverurl, sitepage, listpos, query, target) {

	document.writeln("<script type='text/javascript'>");
	//configuration 
	document.writeln("OAS_url = '" + serverurl + "';"); //ex. http://oasc-training7.247realmedia.com/RealMedia/ads/
	document.writeln("OAS_sitepage = '" + sitepage + "';");
	document.writeln("OAS_listpos = '" + listpos + "';");
	document.writeln("OAS_query = '" + query + "';");
	document.writeln("OAS_target = '" + target + "';");
	//end of configuration
	document.writeln("OAS_version = 10;");
	document.writeln("OAS_rn = '001234567890'; OAS_rns = '1234567890';");
	document.writeln("OAS_rn = new String (Math.random()); OAS_rns = OAS_rn.substring (2, 11);");
	
	document.writeln("function OAS_NORMAL(pos) {");
	
	document.writeln("document.write('<A HREF=\"' + OAS_url + 'click_nx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + '!' + pos + '?' + OAS_query + '\" TARGET=' + OAS_target + '>');"); 
	document.writeln("document.write('<IMG SRC=\"' + OAS_url + 'adstream_nx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + '!' + pos + '?' + OAS_query + '\" BORDER=0/></A>'); "); 
	document.writeln("}");

	document.writeln("OAS_version = 11;");
	document.writeln("if ((navigator.userAgent.indexOf('Mozilla/3') != -1) || (navigator.userAgent.indexOf('Mozilla/4.0 WebTV') != -1))");
	document.writeln(" OAS_version = 10;");
	document.writeln("if (OAS_version >= 11)");
	document.writeln(" document.write('<SCR' + 'IPT type=\"text/javascript\" LANGUAGE=\"JavaScript1.1\" SRC=\"' + OAS_url + 'adstream_mjx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + '?' + OAS_query + '\"><\/SCR' + 'IPT>');"); 
	
	document.writeln("function OAS_AD(pos) {");
	document.writeln("if (OAS_version >= 11)");
	document.writeln(" OAS_RICH(pos);");
	document.writeln("else");
	document.writeln(" OAS_NORMAL(pos);");
	document.writeln("}");
	
	document.writeln("</script>");
	
}

function getAd(site, position) {
	// make it possible to use different ad scripts on different sites
	getAdOAS(position);
}

function getAdOAS(position) {
	document.writeln('<script type="text/javascript"> OAS_AD("' + position + '"); </script>');
}

function getSifoScript(server, sitepage, position, taxonomy) {
	//Open Insight OAS 6.0 TAGGING
	document.writeln("<script type='text/javascript'>");
	document.writeln("_version=11;");
	document.writeln("if (navigator.userAgent.indexOf('mozilla/3') != -1){");
	document.writeln("	_version=10;");
	document.writeln("} ");

	document.writeln("var server = '" + server + "';"); //ex. http://sifomedia.resume.se
	document.writeln("var sitepage = '" + sitepage + "';"); //bonniertids
	document.writeln("var position ='" + position + "';"); //TopRight

	document.writeln("if (! (RN)) {");
	document.writeln("	var RN = new String (Math.random());");
	document.writeln("	var RNS = RN.substring (2, 11);");
	document.writeln("}");

	document.writeln("var oas=server;");
	document.writeln("var oaspage= sitepage + '/1' + RNS + '@' + position;");

	document.writeln("oaspage+='?XE';"); //Don't touch.
	document.writeln("oaspage+='" + taxonomy + "';"); //Add Taxonomy here. ex. &Sajt=resumese&Sektion=&var.sifosect;&Sida=&var.sifopage;
	document.writeln("oaspage+=OAS_rdl + '&if_nt_CookieAccept=' + OAS_CA + '&XE';"); //Don't touch.

	document.writeln("if (_version < 11) {");
	document.writeln("	document.write ('<a href=\"' + oas + '/1c/'+ oaspage + '\" TARGET=\"_top\" ><img src=\"' + oas + '/1/' + oaspage + '\" border=0 width=1 height=1 alt=\" \"/></a>');");
	document.writeln("} else {");
	document.writeln("	document.write ('<scr'+'ipt type=\"text/javascript\" src=\"' + oas + '/3/' + oaspage + '\">//<\/scr'+'ipt\>');");
	document.writeln("}");
	document.writeln("</script>");
}
