// JavaScript Document

var xmlHttp


function adclick(agent,agent2){
	
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 

var url="admin_adrecord.php?ID=" + agent;
url=url+"&sid="+Math.round(Math.random() * 10000); 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

window.open('http://' + agent2);

}


function setPageArea(){
	itemtoH = document.getElementById('all');
	changer = document.body.clientWidth;
	if(changer > 1){
	} else {
	changer = window.innerWidth;
	} 	
	
	if(changer > 1024){
	itemtoH.style.left = (document.body.clientWidth - 1024)/2;
	} else {
	itemtoH.style.left = 0;
	}
}

function myhighlight(agent,agent2){
	itemtoH = document.getElementById(agent);
	itemtoH.src = "layout/" + agent2 +"_circleH.png";
}
function myunhighlight(agent,agent2){
	itemtoH = document.getElementById(agent);
	itemtoH.src = "layout/" + agent2 +"_circle.png";
}
function expander(agent,agent2){
	itemtoE = document.getElementById(agent);
	venuetoShow = document.getElementById(agent2);
	imagetoShow = document.getElementById("image"+agent2);
	
	if(itemtoE.style.height == "150px"){
		itemtoE.style.height = "50px";
		venuetoShow.style.visibility = "hidden"; 
		if(imagetoShow){
			imagetoShow.style.visibility = "hidden";
		}
	} else {
	itemtoE.style.height = "150px";
	venuetoShow.style.visibility = "visible";
	pageTracker._trackPageview("/expanded_event_listing" );
		if(imagetoShow){
		imagetoShow.style.visibility = "visible";
		}
}
}
function circleMe(agent,agent2){
	if(agent2 == "OFF"){
	itemtoH = document.getElementById(agent);
	itemtoH.src = "layout/" + agent2;
	}
}
function uncircleMe(agent,agent2){
	if(agent2 == "OFF"){
	itemtoH = document.getElementById(agent);
	itemtoH.src = "layout/sort_circle.png";
	}
}

function clearField(agent){
	itemtoH = document.getElementById(agent);
	if(itemtoH.value == "Begin typing to see a list of suggestions..." || itemtoH.value == "150 character maximum" || itemtoH.value=="Search Events and Venues"){
		itemtoH.value = "";
	}
}

function checkHault(agent){
	itemtoH = document.getElementById(agent);
	if(itemtoH.value.length > 150){
		itemtoH.value = itemtoH.value.substring(0,149);
	}
}

function findVenue() { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 

var url="admin_venueList.php?"

var param = document.getElementById('v_name').value;
var param2 = document.getElementById('v_name');

if(param.length < 3 || param2.readOnly){
} else {
url=url+"venue="+escape(param);
url=url+"&sid="+Math.round(Math.random() * 10000);
xmlHttp.onreadystatechange=venuesFound 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
}

function venuesFound() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("dynamic_radio").innerHTML = xmlHttp.responseText; 
 } 
}

function pickVenue(agent) { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
var url="admin_venuePick.php?"

var id = "venue"+agent;

url=url+"venue="+agent;
url=url+"&sid="+Math.round(Math.random() * 10000);
xmlHttp.onreadystatechange=venueInfoReturn 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}

function venueInfoReturn() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 
  var originalPick = document.getElementById("dynamic_radio").innerHTML;
  if(originalPick.search("Reset Venue") != -1){
  } else {
  var addUnset = "<input type='radio' onclick=\"unSetVenue()\"  /> Reset Venue<br />";
  document.getElementById("dynamic_radio").innerHTML = originalPick + addUnset;
   }
 
 returnArray = xmlHttp.responseText.split(",");
 document.getElementById("venue"+returnArray[0]).checked = 'checked';
document.getElementById("v_name").value = returnArray[1];
  document.getElementById("v_name").readOnly = "enabled";
    document.getElementById("v_name").style.backgroundColor = '#CCCCCC';
 document.getElementById("address").value = returnArray[2];
 document.getElementById("address").readOnly = "enabled";
     document.getElementById("address").style.backgroundColor = '#CCCCCC';
 document.getElementById("city").value = returnArray[3];
 document.getElementById("city").readOnly = "enabled";
     document.getElementById("city").style.backgroundColor = '#CCCCCC';
  document.getElementById("zip").value = returnArray[4];
 document.getElementById("zip").readOnly = "enabled";
     document.getElementById("zip").style.backgroundColor = '#CCCCCC';
  document.getElementById("ph_number").value = returnArray[5];
 document.getElementById("ph_number").readOnly = "enabled";
     document.getElementById("ph_number").style.backgroundColor = '#CCCCCC';
  document.getElementById("v_website").value = returnArray[6];
 document.getElementById("v_website").readOnly = "enabled";
     document.getElementById("v_website").style.backgroundColor = '#CCCCCC';
   document.getElementById("v_description").value = returnArray[7];
 document.getElementById("v_description").readOnly = "enabled";
     document.getElementById("v_description").style.backgroundColor = '#CCCCCC';
  document.getElementById("v_category").selectedIndex = returnArray[8];
 document.getElementById("v_category").disabled = "disabled";
     document.getElementById("v_category").style.backgroundColor = '#CCCCCC';
 document.getElementById("v_image").disabled = "disabled";
     document.getElementById("v_image").style.backgroundColor = '#CCCCCC';
 } 
}

function unSetVenue(){ 
  document.getElementById("dynamic_radio").innerHTML = "";
  document.getElementById("v_name").value = "Begin typing to see a list of suggestions...";
 document.getElementById("v_name").readOnly = false;
     document.getElementById("v_name").style.backgroundColor = '#FFFFFF';
 document.getElementById("address").value = "";
 document.getElementById("address").readOnly = false;
      document.getElementById("address").style.backgroundColor = '#FFFFFF';
 document.getElementById("city").value = "";
 document.getElementById("city").readOnly =false;
      document.getElementById("city").style.backgroundColor = '#FFFFFF';
  document.getElementById("zip").value = "";
 document.getElementById("zip").readOnly = false;
      document.getElementById("zip").style.backgroundColor = '#FFFFFF';
  document.getElementById("ph_number").value = "";
 document.getElementById("ph_number").readOnly = false;
      document.getElementById("ph_number").style.backgroundColor = '#FFFFFF';
  document.getElementById("v_website").value ="www.";
 document.getElementById("v_website").readOnly = false;
      document.getElementById("v_website").style.backgroundColor = '#FFFFFF';
   document.getElementById("v_description").value = "150 character maximum";
 document.getElementById("v_description").readOnly = false;
      document.getElementById("v_description").style.backgroundColor = '#FFFFFF';
  document.getElementById("v_category").selectedIndex = "";
 document.getElementById("v_category").disabled = "";
      document.getElementById("v_category").style.backgroundColor = '#FFFFFF';
  document.getElementById("v_image").disabled = "";
       document.getElementById("v_image").style.backgroundColor = '#FFFFFF';
}

function lockVenue(agent) 
{ 

if(agent){

  document.getElementById("v_name").readOnly = "enabled";
       document.getElementById("v_name").style.backgroundColor = '#CCCCCC';
 document.getElementById("address").readOnly = "enabled";
      document.getElementById("address").style.backgroundColor = '#CCCCCC';
 document.getElementById("city").readOnly = "enabled";
      document.getElementById("city").style.backgroundColor = '#CCCCCC';
 document.getElementById("zip").readOnly = "enabled";
      document.getElementById("zip").style.backgroundColor = '#CCCCCC';
 document.getElementById("ph_number").readOnly = "enabled";
      document.getElementById("ph_number").style.backgroundColor = '#CCCCCC';
 document.getElementById("v_website").readOnly = "enabled";
      document.getElementById("v_website").style.backgroundColor = '#CCCCCC';
 document.getElementById("v_description").readOnly = "enabled";
      document.getElementById("v_description").style.backgroundColor = '#CCCCCC';
 document.getElementById("v_category").disabled = "disabled";
     document.getElementById("v_category").style.backgroundColor = '#CCCCCC';
document.getElementById("v_image").disabled = "disabled";
 document.getElementById("v_image").style.backgroundColor = '#CCCCCC';
 } 
}


function doit(clickeditem,itemstatus,iam,fcategory,fcost,fdate,fsearch,loggedin,placekeeper) { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
var url="basic.php?"

var params = new Array();

if(fcategory){
	params[0] = "fcategory=" + fcategory;
}
if(fcost){
	params[1] = "fcost=" + fcost;
}
if(fdate){
	params[2] = "fdate=" + fdate;
	if(clickeditem == "sort_circleOther"){
		clickeditem =  document.getElementById("e_mo").value + document.getElementById("e_year").value;
	}
}
if(fsearch){
		if(clickeditem == 'fsearch'){
		
		clickeditem =  escape(document.getElementById("fsearch").value);
		if(clickeditem == escape('Search Events and Venues')){
			clickeditem='none'
		}
		params[3] = "fsearch=" + clickeditem;
		} else {
			params[3] = "fsearch=" + escape(fsearch);
		}

}

	params[4] = "loggedin=" + document.getElementById("loggedin").value;

if(placekeeper > 1){
	params[5] = "placekeeper=" + placekeeper;	
} else {
	params[5] = "placekeeper=" + "1";	
}

var params_formatted = params.join('&'); 

url=url+params_formatted; 
url= url+ "&filterToChange=" + iam + "&filterStatus=" + itemstatus + "&filterAffect=" + clickeditem;

url=url+ "&placekeeper=" + placekeeper;

url=url+"&sid="+Math.round(Math.random() * 10000);


xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}

function mydoit(loggedin,placekeeper) { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
 var url="user_myLimelight.php?"


 loggedin = "loggedin=" + document.getElementById("loggedin").value;

if(placekeeper > 1){
	placekeeper = "&placekeeper=" + placekeeper;	
} else {
	placekeeper = "&placekeeper=" + "1";	
}


url= url + loggedin + placekeeper + "&status=start";

url=url+"&sid="+Math.round(Math.random() * 10000);


xmlHttp.onreadystatechange=replace_allman 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("refresh_area").innerHTML = xmlHttp.responseText; 
 pageTracker._trackPageview("/event_sorting" );
 //on page load call tb_init
$(document).ready(function(){   
	tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
	imgLoader = new Image();// preload image
	imgLoader.src = tb_pathToImage;
});

//add thickbox to href & area elements that have a class of .thickbox
function tb_init(domChunk){
	$(domChunk).click(function(){
	var t = this.title || this.name || null;
	var a = this.href || this.alt;
	var g = this.rel || false;
	tb_show(t,a,g);
	this.blur();
	return false;
	});
}

 
 } 
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
} 

function join_mode() { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
 
var url="user_join.php?join=begin"

url=url+"&sid="+Math.round(Math.random() * 10000);
xmlHttp.onreadystatechange=replace_allman 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}

function replace_allman() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("all_events").innerHTML = xmlHttp.responseText; 
 pageTracker._trackPageview("/general_page_call" );
 } 
}


function submit_join(agent) { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 

var username = escape(document.getElementById('username').value);
var password = document.getElementById('password').value;
var password2 = document.getElementById('password2').value;
var email = document.getElementById('email').value;
var first_name = escape(document.getElementById('first_name').value);
var last_name = escape(document.getElementById('last_name').value);
var address = escape(document.getElementById('address').value);
var address2 = escape(document.getElementById('address2').value);
var city = document.getElementById('city').value;
var zip = document.getElementById('zip').value;

if(document.getElementById('contactOK').checked){
	var contactOK = "yes";	
} else {
	var contactOK = "no";		
}

var url="user_join.php?join=submit";
url= url+"&username="+username+"&password="+password+"&password2="+password2+"&email="+email+"&first_name="+first_name+"&last_name="+last_name+"&address="+address+"&address2="+address2+"&city="+city+"&zip="+zip+"&contactOK="+contactOK;

url=url+"&sid="+Math.round(Math.random() * 10000);
xmlHttp.onreadystatechange=replace_allman 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}


function login_mode() { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
var url="user_login.php?login=begin"
var loggedin = document.getElementById('loggedin').value;

url=url+"&loggedin="+loggedin+"&sid="+Math.round(Math.random() * 10000);
xmlHttp.onreadystatechange=begin_login 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}

function begin_login() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 
  var splitman = xmlHttp.responseText
 pageTracker._trackPageview("/login" );
 if(splitman.indexOf("|-|") !== -1){
 splitman = splitman.split("|-|");
 document.getElementById("loggedin").value = splitman[0]; 
 document.getElementById("all_events").innerHTML = splitman[1]; 
} else {
 document.getElementById("all_events").innerHTML = splitman; 
}
 } 
}

function submit_login() { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 

var username = escape(document.getElementById('username').value);
var password = document.getElementById('password').value;
var loggedin = document.getElementById('loggedin').value;


var url="user_login.php?login=submit";
url= url+"&username="+username+"&password="+password+"&loggedin="+loggedin;

url=url+"&sid="+Math.round(Math.random() * 10000);
xmlHttp.onreadystatechange=process_login
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}

function join_login() { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 

var joinTime = document.getElementById('joinTime').value;

var url="user_login.php?";
url= url+"joinTime=" + joinTime;

url=url+"&sid="+Math.round(Math.random() * 10000);
xmlHttp.onreadystatechange=process_login
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}

function process_login() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 var splitman = xmlHttp.responseText
 pageTracker._trackPageview("/login" );
 if(splitman.indexOf("|-|") !== -1){
 splitman = splitman.split("|-|");
 document.getElementById("loggedin").value = splitman[0]; 
 document.getElementById("all_events").innerHTML = splitman[1]; 
 setTimeout('doit(\'zilch\',\'OFF\',\'zilch\',\'home\',\'free,under20,over20\',\'today\',\'none\',\'none\',\'1\')',2000);
 
} else {
 document.getElementById("loggedin").value = 'no'; 
 document.getElementById("all_events").innerHTML = splitman; 
}

 
 } 
}

function event_mode() { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
var url="user_events.php?event=begin"
var loggedin = document.getElementById('loggedin').value;

	
if(loggedin == 'no'){
	login_mode();
} else {
url=url+"&loggedin="+loggedin+"&sid="+Math.round(Math.random() * 10000);
xmlHttp.onreadystatechange=replace_allman
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
}



function submit_event() { 

var newTextHome = document.getElementById("upload_target");
	newText = newTextHome.contentWindow.document.body.innerHTML;
		document.getElementById("status_message").innerHTML = "Processing Form...";
		    	scroll(0,0)
	pageTracker._trackPageview("/add_events" );

	if(newText == ""){
		setTimeout("submit_event()",1000);
	} else {

	document.getElementById("all_events").innerHTML = newText;

clearTimeout("submit_event()");	
	document.getElementById("upload_target").src="";
	
	if(document.getElementById("venue").checked){
		lockVenue(document.getElementById("venue").value);
	} 

	}
}


function contact_mode() { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
 
var url="user_contact.php?contact=begin";
var loggedin = document.getElementById('loggedin').value;

pageTracker._trackPageview("/contact" );
url=url+"&loggedin="+loggedin+"&sid="+Math.round(Math.random() * 10000);
xmlHttp.onreadystatechange=replace_allman 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}

function submit_contact() { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
 
var url="user_contact.php?contact=submit";
var email = document.getElementById('email').value;
var mysubject = document.getElementById('mysubject').value;
var mymessage = document.getElementById('message').value;
var loggedin = document.getElementById('loggedin').value;


url=url+"&loggedin="+loggedin+"&email="+email+"&mysubject="+mysubject+"&mymessage="+mymessage+"&sid="+Math.round(Math.random() * 10000);
xmlHttp.onreadystatechange=replace_allman 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}

function my_mode() { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
var url="user_myLimelight.php?status=start"
var loggedin = document.getElementById('loggedin').value;

if(loggedin == 'no'){
	login_mode();
} else {
url=url+"&loggedin="+loggedin+"&sid="+Math.round(Math.random() * 10000);
xmlHttp.onreadystatechange=stateChanged2
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
}

function edit_join() { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
var url="user_join.php?join=modify"
var loggedin = document.getElementById('loggedin').value;

url=url+"&loggedin="+loggedin+"&sid="+Math.round(Math.random() * 10000);
xmlHttp.onreadystatechange=replace_allman
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}

function resubmit_join(agent) { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 

var password = document.getElementById('password').value;
var password2 = document.getElementById('password2').value;
var first_name = escape(document.getElementById('first_name').value);
var last_name = escape(document.getElementById('last_name').value);
var address = escape(document.getElementById('address').value);
var address2 = escape(document.getElementById('address2').value);
var city = document.getElementById('city').value;
var zip = document.getElementById('zip').value;
var loggedin = document.getElementById('loggedin').value;

if(document.getElementById('contactOK').checked){
	var contactOK = "yes";	
} else {
	var contactOK = "no";		
}

var url="user_join.php?join=resubmit";
url= url+"&loggedin="+loggedin+"&password="+password+"&password2="+password2+"&first_name="+first_name+"&last_name="+last_name+"&address="+address+"&address2="+address2+"&city="+city+"&zip="+zip+"&contactOK="+contactOK;

url=url+"&sid="+Math.round(Math.random() * 10000);
xmlHttp.onreadystatechange=replace_allman 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}

function copy_event(agent) { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
var url="user_events.php?event=begin"
var loggedin = document.getElementById('loggedin').value;

url=url+"&loggedin="+loggedin+"&eventcopy="+agent+"&sid="+Math.round(Math.random() * 10000);
xmlHttp.onreadystatechange=replace_allman_copy
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function replace_allman_copy() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 pageTracker._trackPageview("/copy_events" );
 document.getElementById("all_events").innerHTML = xmlHttp.responseText; 
	if(document.getElementById("venue").checked){
		lockVenue(document.getElementById("venue").value);

	} 	
 } 
}

function delete_event(agent) { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
var url="user_myLimelight.php?status=start"
var loggedin = document.getElementById('loggedin').value;

url=url+"&loggedin="+loggedin+"&delete="+agent+"&sid="+Math.round(Math.random() * 10000);
xmlHttp.onreadystatechange=stateChanged2
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}

function stateChanged2() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("all_events").innerHTML = xmlHttp.responseText; 
 pageTracker._trackPageview("/myLimelight" );
 //on page load call tb_init
$(document).ready(function(){   
	tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
	imgLoader = new Image();// preload image
	imgLoader.src = tb_pathToImage;
});

//add thickbox to href & area elements that have a class of .thickbox
function tb_init(domChunk){
	$(domChunk).click(function(){
	var t = this.title || this.name || null;
	var a = this.href || this.alt;
	var g = this.rel || false;
	tb_show(t,a,g);
	this.blur();
	return false;
	});
}

 
 } 
}


function faq_mode(agent) { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
var url="user_FAQ.php?status=start";	

if(agent > 0){
	url = url+ "&question=" + agent;	
}

url=url+"&sid="+Math.round(Math.random() * 10000);
xmlHttp.onreadystatechange=replace_allman
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}

function tos_mode() { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
var url = "tos.php"
url=url+"?sid="+Math.round(Math.random() * 10000);
xmlHttp.onreadystatechange=replace_allman
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}

function privacy_policy_mode() { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }

var url = "privacy_policy.php"
url=url+"?sid="+Math.round(Math.random() * 10000);
xmlHttp.onreadystatechange=replace_allman
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}