function popUp(URL, height, width) {
	if( window.popup) {
		try {
			window.popup.close();
		} catch(e) {}
	}
	window.popup = window.open(URL, 'imagePopup', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=' + width + ',height=' + height);
}

function privacyPopUp() {
	if( window.privacy) {
		try {
			window.privacy.close();
		} catch(e) {}
	}
	window.privacy = window.open('privacy-policy.php', 'privacyPopup', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=400,height=120');
}

var req;

function loadXMLDoc(url) 
{
    // branch for native XMLHttpRequest object
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = processReqChange;
        req.open("GET", url, true);
        req.send(null);
    // branch for IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = processReqChange;
            req.open("GET", url, true);
            req.send();
        }
    }
}
function processReqChange() 
{
  if (req.readyState == 4) {
    if (req.status == 200) {
      eval(req.responseText);
    }
  }
}

function doneHelpful( id ) {
}

function doHelpful( id ) {
  url = 'add-helpful.php?id=' + id + '&code=doneHelpful(' + id + ')';
  loadXMLDoc(url);
  elem = document.getElementById('helpful' + id );
  elem.className = 'done-helpful';
}
