function showCode(arg, obj, obj2, id, p, counter){
		if(p.value=="") { obj.value=""; alert("Please enter Flag name!"); }
	else if(obj2.disabled == true){
		txt = new Array("first", "second", "third", "fourth", "fifth", "sixth");
		code='<!-- Begin TwoSpots Statistics and Counter Script -->\n';
		code+='<!-- URL: http://www.twospots.com/ -->\n';
		code+='<table width="100" border="0" cellspacing="0" cellpadding="0"><tr><td><div align="center">';
		code+='<script language="JavaScript" type="text/javascript" src="http://www.tscounter.com/statw3c/tscounter.php"></script>\n';
		code+='<script language="JavaScript" type="text/javascript">\n';
		code+='<!--\n';
		code+='tscounter("'+id+'", "");\n';
		code+='// -->\n';
		code+='</script>\n';
		code+='<noscript>\n';
		code+='<a target="_blank" href="http://www.twospots.com/?statid='+id+'">\n';
		code+='<img src="http://www.tscounter.com/images/ts_web_counter_2.gif" border="0" alt="TwoSpots - Free website statistics and counter script"></a><br>\n';
		code+='<a target="_blank" href="http://www.twospots.com">Free website statistics</a>\n';
		code+='</noscript>\n';
		code+='</div></td></tr></table>\n';
		code+='<!-- End TwoSpots Statistics and Counter Script -->\n';
		
		obj.value=code;
		
		alert("You can copy/paste code for your "+txt[arg-1]+" page!");
		document.location = "#counter";
	} else alert("First you need to Save Changes and then you can get code for this flag!");
}
function showKWPC(obj, col1, col2, col3, col4, col5){
		code='<!-- Begin TS Keyword Position Checker -->\n';
		code+='<!-- URL: http://www.twospots.com/ -->\n';
		code+='<div id="tslayer" style="position:absolute; width:204; z-index:2;background-color: #'+col1+';">\n';
  		code+='<table width="200" border="0" align="center" cellpadding="3" cellspacing="0" id="tstable" style="margin: 2px;background-color: #'+col2+';">\n';
		code+='<tr>\n';
	  	code+='<td width="400" height="25" id="tstop" style="font-family: Arial;font-size: 12px;background-color: #'+col1+';"><strong>\n';
		code+='<div align="center" id="tstitle"style="color: #'+col2+'">Key Word Position Checker</div>\n';
	  	code+='</strong></td>\n';
		code+='</tr>\n';
		code+='<tr>\n';
		code+='<form action="" method="post" name="tsform" target="tshidd">\n';
		code+='<tr id="tsbody" height="130px">\n';
		code+='<td style="font-family: Arial;font-size: 12px;color: #000000;line-height: 20px;">\n';
		code+='Find your keyword position <br><strong>Enter Site:</strong> <br>\n';
		code+='http://<input name="tssite" type="text" id="tssite" value="" maxlength="100" style="font-family: Arial;font-size: 12px;width=110px; border: 1px solid #999999;"><br><strong>Enter Key Word:</strong><br>\n';
		code+='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n';
		code+='<input name="tskey" type="text" id="tskey" value="" maxlength="30" style="font-family: Arial;font-size: 12px;width=110px; border: 1px solid #999999;">\n';
		code+='</td>\n';
		code+='</tr>\n';
		code+='<tr id="tsbody2" height="130px" style="display:none">\n';
		code+='<td id="tsbody3" style="font-family: Arial;font-size: 12px;color: #000000;line-height: 20px;"></td>\n';
		code+='</tr>\n';
		code+='<tr>\n';
	  	code+='<td height="25"><div align="center"><strong>\n';
	  	code+='<input name="tsshow" type="button" id="tsshow" style="cursor:hand; width:100px; font-family: Arial;font-size: 11px;border: 1px solid #999999;background-color: #'+col1+';color: #'+col2+';" value="Show Me" onClick=\'document.getElementById("tshidd").src="wordposition.html"\'>\n';
	  	code+='</strong></div></td>\n';
		code+='</tr></form>\n';
		code+='<tr>\n';
	  	code+='<td height="20" id="tsbottom" style="font-family: Arial;font-size: 12px;background-color: #'+col1+';"><div align="center"><a href="http://www.twospots.com/free-keyword-position-checker/" target="_blank" id="tsfooter" style="color: #'+col3+';">powered by TwoSpots</a> </div></td>\n';
		code+='</tr>\n';
  		code+='</table>\n';
		code+='</div>\n';
		code+='</div></td></tr></table>\n';
		code+='<iframe src="wordposition.html" name="tshidd" scrolling=no  frameborder=0 id="tshidd" style="WIDTH: 0px; HEIGHT: 0px; POSITION: relative; z-index:2; overflow: auto;" ;></iframe>\n';
		code+='<!-- End TS Key Word Position Checker -->\n';
		
		obj.value=code;
}

function getUOCode(primg, code){
	prCode = '<!-- Begin Users Online -->\n';
	prCode+= '<!-- URL: http://www.twospots.com/ -->\n';

	prCode+= '<table width="76" border="0" cellspacing="0" cellpadding="0">\n';
	prCode+= '<tr>\n';
	prCode+= '<td width="39"><a href="http://www.twospots.com/free-users-online-counter/" target="_blank"><img src="http://www.askgamblers.net/images/users-online/users-online'+primg+'.gif" width="39" height="21" border="0"  alt="Number of online users in last 3 minutes"></a></td>\n';

    prCode+= '<td width="37"><script type="text/javascript">document.write(\'<a href="http://www.twospots.com/free-users-online-counter/" target="_blank"><img src="http://www.askgamblers.net/uow3c/?id='+code+'" width="37" height="21" border="0" alt="Number of online users in last 3 minutes"></ a>\');';

	prCode+= '</script>';
	prCode+= '<noscript>\n<a href="http://www.twospots.com/web-services/web-design/" style="style: none;"><img src="http://www.askgamblers.net/uow3c/?id='+code+'" width="37" height="21" border="0" alt="web site design"></a></noscript></td>\n';
	prCode+= '</tr>\n';
	prCode+= '<tr>\n';
	prCode+= '<td colspan="2"><a href="http://www.askgamblers.com" target="_blank"><img src="http://www.askgamblers.net/images/users-online/askgamblers.gif" width="76" height="11" border="0" alt="casino"></a></td>';
	prCode+= '<tr>\n';
	prCode+= '</table>\n';
	prCode+= '<!-- End Users Online -->\n';
	
	document.getElementById("prsource").value = prCode;
}