checked = false;
function processCart(mode)
{
	document.frmcart.mode.value = mode;
	document.frmcart.submit();
}
function isDownload(chkobj,cart_id)
{
	if(chkobj.checked==true)
	document.frmcart.mode.value = "setasdownload";
	else
	document.frmcart.mode.value = "unsetasdownload";
	
	document.frmcart.single_item_id.value=cart_id;
	
	document.frmcart.submit();
}
function addtocart(mode,id)
{
	document.frmcart.mode.value = mode;
	document.frmcart.id.value = id;
	document.frmcart.submit();
}

function checkedAll(frmobj)
{
	if (checked == false){checked = true}else{checked = false}
	for (var i = 0; i < frmobj.elements.length; i++)
	{
		frmobj.elements[i].checked = checked;
	}
}

function makeInactive()
{
	document.frmlist.mode.value = "Inactive";
	document.frmlist.submit();
}

function makeActive()
{
	document.frmlist.mode.value = "Active";
	document.frmlist.submit();
}

function deleteone(id,mode)
{
	var ans = confirm("Are you sure you want to delete this record?");
	if(ans)
	{
		for (var i = 0; i < document.frmlist.elements.length; i++)
		{
			document.frmlist.elements[i].checked = false;
		}
		document.getElementById(id).checked = true;
		document.frmlist.mode.value = mode;
		document.frmlist.submit();
		return true;
	}
	else
	{	
		return false;
	}
}

function makeDelete()
{
	var ans = confirm("Are you sure you want to delete selected record(s)?");
	if(ans)
	{
		document.frmlist.mode.value = "Delete";
		document.frmlist.submit();
		return true;
	}
	else
	{
		return false;
	}
}

function makeDeleteUserTest(frmobj)
{
	var ans = confirm("Are you sure you want to delete selected record(s)?");
	if(ans)
	{
		frmobj.mode.value = "Delete";
		frmobj.action = "index.php?pg=usertestaction";
		frmobj.submit();
		return true;
	}
	else
	{
		return false;
	}
}

function makeUpdateTestConfig(frmobj)
{
	frmobj.mode.value = "Edit";
	frmobj.action = "index.php?pg=testconfigaction";
	frmobj.submit();
}

function makeDeleteTest(frmobj)
{
	var isconfirm = confirm("Along with this Test information, Test given by users also get deleted, Are you sure you want to delete this Test?");
	if(isconfirm)
	{
		frmobj.mode.value = "Delete";
		frmobj.submit();
	}
	else
	{
		return false;
	}
}


function imagePopup(url)
{
	var URL = url;
	var winname = 'test';
	var winParam = 'location=0,status=1,scrollbars=0,toolbar=0,menubar=0,resizable=no,scrollbars=0';
	window.open (URL,winname,winParam); 
}

function selectAll(obj)
{
	var objlength = obj.length;
	
	for(var i=0;i<objlength;i++)
	{
		obj[i].selected = true;
	}
}

function deselectAll(obj)
{
	var objlength = obj.length;
	
	for(var i=0;i<objlength;i++)
	{
		obj[i].selected = false;
	}
}

function generateQuestion(obj)
{
	var n = parseInt(obj.value);
	
	if(isNaN(n))
	{
		alert("Please enter valid number.");
		obj.focus();
		return false;
	}
	
	var nQDIV = parseInt(document.getElementById("nQDIV").value);
	var isNewReq = true;
	var iStart = 0;
	var iEnd = n;
	
	if(nQDIV > n)
	{
		var rStart = n;
		var rEnd = nQDIV;
		
		for(var j=rStart;j<rEnd;j++)
		{
			parentDiv = document.getElementById("mainDiv");
			removeDiv = document.getElementById("QDiv"+j);
			parentDiv.removeChild(removeDiv);		
		}
		document.getElementById("nQDIV").value = n;
		isNewReq = false;
	}
	
	if(nQDIV < n && nQDIV != 0)
	{
		iStart = nQDIV;
		iEnd = n;
	}
	
	if(nQDIV == n && nQDIV != 0 && n != 0)
	{
		isNewReq = false;
	}
	
	if(isNewReq)
	{
		for(var i=iStart;i<iEnd;i++)
		{
			newDivEle = document.createElement("div");
			newDivEle.setAttribute("id","QDiv"+i);
			var newDiv = '';
			newDiv += '<table border="0" width="100%" align="left">';
			newDiv += '<tr><td align="left" width="17%">Question:</td><td align="left"><input type="text" style="width:200px;" value="" name="Q[]" id="Q'+i+'">&nbsp;<font color="#FF0000"><sup>*</sup></font>&nbsp;<a style="cursor:pointer;" onclick=removeQuestion("'+i+'");>Remove</a></td></tr>';
			newDiv += '<tr><td align="left">No of Answers:</td><td align="left"><input type="text" style="width:50px;" value="" name="NA[]" id="NA'+i+'" onBlur="return generateAnswer(this,'+i+');">&nbsp;<font color="#FF0000"><sup>*</sup></font></td></tr>';
			newDiv += '<tr><td align="left">&nbsp;</td><td align="left"><div id="mainDivA'+i+'"></div></td></tr>';
			newDiv += '<tr><td colspan="2"><hr></td></tr>';
			newDiv += '</table>';
			
			my_div = document.getElementById("mainDiv");
			
			newDivEle.innerHTML = newDiv;
			my_div.appendChild(newDivEle);
		}
		
		document.getElementById("nQDIV").value = n;
	}
	
}


function generateAnswer(obj,i)
{
	var n = parseInt(obj.value);
	
	if(isNaN(n))
	{
		alert("Please enter valid number.");
		obj.focus();
		return false;
	}
	
	var nADIV = parseInt(document.getElementById("nADIV").value);
	
	if(nADIV == 0)
	{
		iStart = 0;
		iEnd = n;
	}
	else
	{
		iStart = nADIV;
		iEnd = parseInt(iStart+n);
	}
	
	my_div = document.getElementById("mainDivA"+i);
	my_div.innerHTML = '';
	for(var j=iStart,m=0;j<iEnd;j++)
	{
		newDivEle = document.createElement("div");
		newDivEle.setAttribute("id","ADiv"+j);
		
		var newDiv = '';
		newDiv += '<table border="0" width="100%" align="left">';
		newDiv += '<tr><td align="left" width="9%">Answer:</td><td align="left"  width="57%"><input type="text" style="width:200px;" value="" name="A'+i+'[]" id="A'+i+'">&nbsp;<font color="#FF0000"><sup>*</sup></font>&nbsp;<a style="cursor:pointer;" onclick=removeAnswer("'+i+'","'+j+'");>Remove</a></td><td><input type="radio" name="iscorrectans'+i+'" id="iscorrectans'+i+'" value="'+m+'" />&nbsp;Mark as correct</td></tr>';
		newDiv += '</table>';
		
		m++;
		
		my_div = document.getElementById("mainDivA"+i);
		
		newDivEle.innerHTML = newDiv;
		my_div.appendChild(newDivEle);
	}
	
	document.getElementById("nADIV").value = iEnd;
}

function removeQuestion(j)
{
	parentDiv = document.getElementById("mainDiv");
	removeDiv = document.getElementById("QDiv"+j);
	parentDiv.removeChild(removeDiv);
	document.getElementById("nQDIV").value = parseInt(document.getElementById("nQDIV").value)-1;
	document.getElementById("nQuestion").value = parseInt(document.getElementById("nQuestion").value)-1;
	if(document.getElementById("nQuestion").value == 0)
	{
		document.getElementById("nQuestion").value = "";
	}
}

function removeAnswer(i,j)
{
	parentDiv = document.getElementById("mainDivA"+i);
	removeDiv = document.getElementById("ADiv"+j);
	parentDiv.removeChild(removeDiv);
	document.getElementById("NA"+i).value = parseInt(document.getElementById("NA"+i).value)-1;
	if(document.getElementById("NA"+i).value == 0)
	{
		document.getElementById("NA"+i).value = "";
	}
}

function submitsearch(obj,page)
{
	obj.action = page;
	obj.submit();
}

function removesearch(obj,page)
{
	obj.action = page;
	obj.submit();
}

function makeChecked(i)
{
	document.getElementById("chk"+i).checked = true;
}

function displayRestaurant(val,adminval)
{
	if(val == adminval || val == "")
	{
		document.getElementById("trrestaurant").style.display = 'none';
	}
	else
	{
		document.getElementById("trrestaurant").style.display = '';
	}
}

function getAccessLog()
{
	window.location.href = "exportaccesslog.php";
}

function showHideDiv(divid)
{
	if(document.getElementById(divid).style.display == 'none')
	{
		document.getElementById(divid).style.display = '';
	}
	else
	{
		document.getElementById(divid).style.display = 'none';
	}
}

function setMode(mode,pg)
{
	document.frmlist.mode.value = mode;
	document.frmlist.action = "index.php?pg="+pg;
	document.frmlist.submit();
}

var gAutoPrint = true; // Flag for whether or not to automatically call the print function
function printSchedule(){
	if(document.getElementById != null){
		var html = '<HTML>\n<HEAD>';
		if (document.getElementsByTagName != null){
			var headTags = document.getElementsByTagName("head");
			if (headTags.length > 0)
				html += headTags[0].innerHTML;
		}
		html += '\n</HE' + 'AD>\n<BODY style="background-color:#000000; color:#ffffff; font-size:11px;">\n';
		var printReadyElem = document.getElementById("printReady");
		if (printReadyElem != null){
			html += printReadyElem.innerHTML;
		}else{
			alert("Could not find the printReady section in the HTML");
			return;
		}
		html += '\n</BO' + 'DY>\n</HT' + 'ML>';
		var printWin = window.open("","printSpecial");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint){
			printWin.print();
			printWin.close();
		}
	}else{
		alert("Sorry, the print ready feature is only available in modern browsers.");
	}
}

function togglereplydiv(displaydiv_id,changetxtdiv,hidediv_id,hidedivtxt)
{
	document.getElementById(hidediv_id).style.display="none";
		//alert(hidediv_id+"_text"+document.getElementById(hidediv_id+"_text").innerHTML);
	
	//document.getElementById(hidedivtxt).innerHTML="SHOW";

	if(document.getElementById(displaydiv_id).style.display=='none')
	{
 
	document.getElementById(changetxtdiv).innerHTML="HIDE";
	document.getElementById(displaydiv_id).style.display="block";
	
	
	}
	else if(document.getElementById(displaydiv_id).style.display=='block')
	{

	document.getElementById(changetxtdiv).innerHTML="SHOW";
	document.getElementById(displaydiv_id).style.display="none";
	
	}
}
function togglereplydiv1(displaydiv_id,changetxtdiv,hidediv_id,hidedivtxt)
{
	document.getElementById(hidediv_id).style.display="none";
		//alert(hidediv_id+"_text"+document.getElementById(hidediv_id+"_text").innerHTML);
	
	document.getElementById(hidedivtxt).innerHTML="SHOW";

	if(document.getElementById(displaydiv_id).style.display=='none')
	{
 
	//document.getElementById(changetxtdiv).innerHTML="HIDE";
	document.getElementById(displaydiv_id).style.display="block";
	
	
	}
	else if(document.getElementById(displaydiv_id).style.display=='block')
	{

	//document.getElementById(changetxtdiv).innerHTML="SHOW";
	document.getElementById(displaydiv_id).style.display="none";
	
	}
}
var oldName="";
function changereplydiv(displaydiv_id,hidediv_id)
{
/*	document.getElementById(hidediv_id).style.display="none";
	document.getElementById(displaydiv_id).style.display="block";
*/	if(oldName!="")
	{
		if(document.getElementById(oldName).style.display == "")
		{
			document.getElementById(oldName).style.display = "none";
			document.getElementById(hidediv_id).style.display="none";
		}
	}
	if(document.getElementById(displaydiv_id).style.display == "none")
	{
		document.getElementById(displaydiv_id).style.display = "";
		document.getElementById(hidediv_id).style.display="none";
	}
	else
	{
		document.getElementById(displaydiv_id).style.display = "none";
		document.getElementById(oldName).style.display = "none";
		document.getElementById(displaydiv_id).style.display=""
	}
	oldName=displaydiv_id;
	

	//alert(hidediv_id+"_text"+document.getElementById(hidediv_id+"_text").innerHTML);
}


function randomString_blog() {
	var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
	var string_length = 5;
	var randomstring = '';
	for (var i=0; i<string_length; i++) {
		var rnum = Math.floor(Math.random() * chars.length);
		randomstring += chars.substring(rnum,rnum+1);
	}
	return randomstring;
}


function newImage(rqImg)
{
	//alert(textId);	
	if(rqImg==1)
	{
		rtext=randomString_blog();
		document.getElementById("captext").value=rtext;
		document.getElementById("captchaImg").src='captcha.php?rqImg='+rtext+'';
	}
	if(rqImg==2)
	{	
		rtext=randomString_blog();
		document.getElementById("rcaptext").value=rtext;
		document.getElementById("rcaptchaImg").src='captcha.php?rqImg='+rtext+'';
	}
}


function newImage1(rqImg,cnt)
{
	if(rqImg==1)
	{
		rtext=randomString_blog();
		document.getElementById("captext"+cnt).value=rtext;		
		document.getElementById("captchaImg"+cnt).src='captcha.php?rqImg='+rtext+'';
	}
	if(rqImg==2)
	{
		rtext=randomString_blog();
		document.getElementById("rcaptext"+cnt).value=rtext;		
		document.getElementById("rcaptchaImg"+cnt).src='captcha.php?rqImg='+rtext+'';
	}	
}


function randomString() {
	var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
	var string_length = 8;
	var randomstring = '';
	for (var i=0; i<string_length; i++) {
		var rnum = Math.floor(Math.random() * chars.length);
		randomstring += chars.substring(rnum,rnum+1);
	}
	return randomstring;
}

function selectdeselect(id,mode)
{
	for (var i = 0; i < document.frmlist.elements.length; i++)
	{
		document.frmlist.elements[i].checked = false;
	}
	document.getElementById(id).checked = true;
	document.frmlist.mode.value = mode;
	document.frmlist.submit();
}

function cancel(qrystr)
{
	window.location.href=qrystr;
}

function setascdofweek(mode)
{
	document.frmlist.mode.value = mode;
	document.frmlist.submit();
}

/////For Listing Album records
function showAlbum_scdt(str)
{
if (str=="")
  {
  //document.getElementById("divAlbum").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("divAlbum").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","scdtlist.php?artistId="+str,true);
xmlhttp.send();
}

//Diplay list of State for only US, CA and for other set text box.
function showstate_shp(str,selectval,divid,cname,cid)
{
		
	//alert(str);
if (str=="")
  {
   //document.getElementById("divStateC").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp3=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp3=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp3.onreadystatechange=function()
  {
  if (xmlhttp3.readyState==4 && xmlhttp3.status==200)
    {	// alert(xmlhttp3.responseText);
		 document.getElementById(divid).innerHTML=xmlhttp3.responseText;	  
    }
  }
xmlhttp3.open("GET","scdtlist.php?countrycode="+str+"&selectval="+selectval+"&cname="+cname+"&cid="+cid,true);
xmlhttp3.send();
}



function hideTable(val)
{
	if(val==true)
	{
		document.getElementById('Ship_Address').style.display = "none";
	}
	else
	{
		document.getElementById('Ship_Address').style.display="";
		document.frmsignup.sh_title.value="";
	}
}

function fillInfo(control,basefield,selectedfield)
{
	control.options.length = 0;
	flag = 0;
	for(i=0,j=0; i<fillArr.length; i++)
	{
		if(fillArr[i][0] == basefield)
		{
			if(selectedfield == fillArr[i][1])
			{
				control.options[j] = new Option(fillArr[i][1]+" "+fillArr[i][2]);
				control.options[j].value = fillArr[i][1];
				control.options[j].selected = true;
				flag = 1;
				
			}
			else
			{
				control.options[j] = new Option(fillArr[i][1]+" "+fillArr[i][2]);
				control.options[j].value = fillArr[i][1];
			}				
			j++;
		}
	}
}
function checksel(selobj)
{ 
	  if(selobj.value=='G' || selobj.value=='L')
	  {
		document.getElementById("ccno").style.display="none";
		document.getElementById("expdate").style.display="none";
		document.getElementById("ccname").style.display="none";
		if(selobj.value=='L')
		{
			if(document.getElementById("claimcode"))
				document.getElementById("claimcode").style.display="none";
			if(document.getElementById("couponcodetr"))
				document.getElementById("couponcodetr").style.display="none";
		}
		
		if(selobj.value=='G')
		{
			if(document.getElementById("claimcode"))
				document.getElementById("claimcode").style.display="";
			if(document.getElementById("couponcodetr"))
				document.getElementById("couponcodetr").style.display="";
		}
	  }
	  else
	  {
		document.getElementById("ccno").style.display="";
		document.getElementById("expdate").style.display="";
		document.getElementById("ccname").style.display="";
		if(document.getElementById("claimcode"))
			document.getElementById("claimcode").style.display="none";
		if(document.getElementById("couponcodetr"))
				document.getElementById("couponcodetr").style.display="";
	  }
	  
}
function proceedscrpt(chkobj,isLoginFlag)
{
	memloginlink="index.php?file=ca-checkoutOpt";
	 if(chkobj.checked)
	 {
		  document.getElementById("proceed").href="index.php?file=ca-viewcart&shipinfo=1&gift=1";
	 }
	 else
	 {
		 if(isLoginFlag !=1)
		 {	
			 document.getElementById("proceed").href=memloginlink;
		 }
		 else
		 {
			 document.getElementById("proceed").href="index.php?file=ca-viewcart&shipinfo=1";
		 }
	 }
}


function trim (myString)
{
return myString.replace(/^\s+/g,'').replace(/\s+$/g,'')
}

function validate()
{
	var searchstring=trim(document.sphsearchform.query.value);
	
	if((searchstring==null) || (searchstring==""))
	{
	alert("Please Enter Valid Search String !");
	return false;
	}
	else
	{
	document.sphsearchform.action="index.php?file=site_search_results#results";
	document.sphsearchform.submit();
	}
	
}

function showMagazine1(val1,val2){
	if(val1==val2){
		document.getElementById('eMagazine').style.display = "";		
	}else{
		document.getElementById('eMagazine').style.display = "none";		
	}
}
function shwinstantdownhelp(helptxt)
{
	  var content2 = '<p style=\'font-size:16px; text-align:left;\'>'+helptxt+'</p>';
						TINY.box.show(content2,0,0,0,0,0) 
}
function artistInfo2(control,basefield,selectedfield)
{
	//alert(control + "  " +basefield + " " + selectedfield);
	control.options.length = 0;
	flag = 0;
	for(i=0,j=0; i<fillArr1.length; i++)
	{
		if(fillArr1[i][0] == basefield)
		{
			if(selectedfield == fillArr1[i][1])
			{
				control.options[j] = new Option(fillArr1[i][2]);
				control.options[j].value = fillArr1[i][1];
				control.options[j].selected = true;
				flag = 1;
				
			}
			else
			{
				control.options[j] = new Option(fillArr1[i][2]);
				control.options[j].value = fillArr1[i][1];
				//alert
			}				
			j++;
		}
	}
	if(j == 0)
	{
		control.options[j] = new Option("No Album");
		control.options[j].value = "";
	}
}

function viewartistprofile(artistid)
{
	if(artistid != "")
	{
		window.location.href = artistid;
	}
}



var popurls=new Array()

//popurls[0]="http://www.texasmusicworld.com/newradio.htm"
//popurls[0]="http://192.168.0.253/lonestarmusic/newradio.htm"; // For Local
popurls[0]="http://www.lonestarmusic.com/newradio.htm"; // For Live
 
var winpops;
function openpopup(popurl){

	winpops=window.open(popurl,"","width=484,height=379");
	//winpops.addEventListener("onunload", closedWin, false);
/*	if(winpops.onclose){
		winpops.onunload = closedWin;
	}
*/
/*	if (winpops.addEventListener) {
		winpops.addEventListener ("onunload",closedWin,false);
	}
	else if (winpops.attachEvent) {
		winpops.attachEvent ("onunload",closedWin);
	}
	else {
		winpops.onmouseout = closedWin;
	}*/
}

function closedWin() {
	var cookie_date = new Date ( );  // now
	cookie_date.setTime ( cookie_date.getTime() - 1); 
	document.cookie = "jkpopup=yes;expires=" + cookie_date.toGMTString();
}

function get_cookie(Name) {

  var search = Name + "="

  var returnvalue = "";

  if (document.cookie.length > 0) {

    offset = document.cookie.indexOf(search)

    if (offset != -1) { // if cookie exists

      offset += search.length

      // set index of beginning of value

      end = document.cookie.indexOf(";", offset);

      // set index of end of cookie value

      if (end == -1)

         end = document.cookie.length;

      returnvalue=unescape(document.cookie.substring(offset, end))

      }

   }

  return returnvalue;

}

 

function loadornot(){	
	if (get_cookie('jkpopup')==''){
	
		openpopup(popurls[Math.floor(Math.random()*(popurls.length))])

		document.cookie="jkpopup=yes"
		
	//	var cookie_date = new Date ( );  // now
	//	cookie_date.setTime ( cookie_date.getTime() - 1 ); 
	//	document.cookie = "jkpopup=yes;expires=" + cookie_date.toGMTString();

	}
	else{
			alert("The audio player window is already open.");

	}

}


//popup for newsletter on home page-----------------------------------------------------------
function ModalPopupsCustom1() {
					ModalPopups.Custom("idCustom",
						"Newsletter Signup",
						"<form action='index.php?file=newsletter' name='newsletter' id='newsletter'  method='post'>"+
						"<div style='padding: 5px;'>" + 
						"<table>" + 
						"<tr><td>&nbsp;</td><td><div id='errNewsletter' style='height:15px;color:red;'></div></td></tr>" + 						
						"<tr><td width='20xp'>Email: </td><td><input type=text id='emailtest' style='width:150px;' name='email'></td></tr>" + 
						"</table></form>" + 
						"</div>", 
						{
							width: 300,
							buttons: "ok,cancel",
							okButtonText: "Ok",
							cancelButtonText: "Cancel",
							onOk: "ModalPopupsCustomSave()",
							onCancel: "ModalPopupsCustomCancel()"
						}
					);
							
					ModalPopups.GetCustomControl("emailtest").focus(); 
}
				
				function ModalPopupsCustomSave() {
					var email = ModalPopups.GetCustomControl("emailtest"); 
					if(email.value == "")
					{
						document.getElementById("errNewsletter").innerHTML = "Please enter email";
						//alert("Please submit a email");
						email.focus();
					}
					else if(validate(email.value)==false){
						document.getElementById("errNewsletter").innerHTML = 'Invalid Email Address';
						email.focus();
					}
					else
					{
						document.newsletter.submit();
						
						ModalPopups.Close("idCustom");
					}
				}
				function validate(email) {
				   var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
				   //var address = document.getElementById("emailtest").value;
				   if(reg.test(email) == false) {
					  return false;
				   }
				}				
			   function ModalPopupsCustomCancel() {
					//alert('You pressed Cancel');
					ModalPopups.Cancel("idCustom");
				}
				
				
//-----------------------------------------------------------------------------------------------

function bannerclick(id,url)
{
	
	  if (id=="")
  {
   //document.getElementById("divStateC").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp3=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp3=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp3.onreadystatechange=function()
  {
  if (xmlhttp3.readyState==4 && xmlhttp3.status==200)
    {	//alert(xmlhttp3.responseText);
	
		
		//document.getElementById(divid).innerHTML=xmlhttp3.responseText;	  
    }
  }
xmlhttp3.open("GET","countclicks.php?bannerid="+id,true);
xmlhttp3.send();
}
