/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.2
*/
(function(){YAHOO.widget.TabView=function(K,J){J=J||{};if(arguments.length==1&&!YAHOO.lang.isString(K)&&!K.nodeName){J=K;K=J.element||null;}if(!K&&!J.element){K=I.call(this,J);}YAHOO.widget.TabView.superclass.constructor.call(this,K,J);};YAHOO.extend(YAHOO.widget.TabView,YAHOO.util.Element);var F=YAHOO.widget.TabView.prototype;var E=YAHOO.util.Dom;var H=YAHOO.util.Event;var D=YAHOO.widget.Tab;F.CLASSNAME="yui-navset";F.TAB_PARENT_CLASSNAME="yui-nav";F.CONTENT_PARENT_CLASSNAME="yui-content";F._tabParent=null;F._contentParent=null;F.addTab=function(M,O){var P=this.get("tabs");if(!P){this._queue[this._queue.length]=["addTab",arguments];return false;}O=(O===undefined)?P.length:O;var R=this.getTab(O);var T=this;var L=this.get("element");var S=this._tabParent;var Q=this._contentParent;var J=M.get("element");var K=M.get("contentEl");if(R){S.insertBefore(J,R.get("element"));}else{S.appendChild(J);}if(K&&!E.isAncestor(Q,K)){Q.appendChild(K);}if(!M.get("active")){M.set("contentVisible",false,true);}else{this.set("activeTab",M,true);}var N=function(V){YAHOO.util.Event.preventDefault(V);var U=false;if(this==T.get("activeTab")){U=true;}T.set("activeTab",this,U);};M.addListener(M.get("activationEvent"),N);M.addListener("activationEventChange",function(U){if(U.prevValue!=U.newValue){M.removeListener(U.prevValue,N);M.addListener(U.newValue,N);}});P.splice(O,0,M);};F.DOMEventHandler=function(P){var K=this.get("element");var Q=YAHOO.util.Event.getTarget(P);var S=this._tabParent;if(E.isAncestor(S,Q)){var L;var M=null;var J;var R=this.get("tabs");for(var N=0,O=R.length;N<O;N++){L=R[N].get("element");J=R[N].get("contentEl");if(Q==L||E.isAncestor(L,Q)){M=R[N];break;}}if(M){M.fireEvent(P.type,P);}}};F.getTab=function(J){return this.get("tabs")[J];};F.getTabIndex=function(N){var K=null;var M=this.get("tabs");for(var L=0,J=M.length;L<J;++L){if(N==M[L]){K=L;break;}}return K;};F.removeTab=function(M){var L=this.get("tabs").length;var K=this.getTabIndex(M);var J=K+1;if(M==this.get("activeTab")){if(L>1){if(K+1==L){this.set("activeIndex",K-1);}else{this.set("activeIndex",K+1);}}}this._tabParent.removeChild(M.get("element"));this._contentParent.removeChild(M.get("contentEl"));this._configs.tabs.value.splice(K,1);};F.toString=function(){var J=this.get("id")||this.get("tagName");return"TabView "+J;};F.contentTransition=function(K,J){K.set("contentVisible",true);J.set("contentVisible",false);};F.initAttributes=function(J){YAHOO.widget.TabView.superclass.initAttributes.call(this,J);if(!J.orientation){J.orientation="top";}var L=this.get("element");if(!YAHOO.util.Dom.hasClass(L,this.CLASSNAME)){YAHOO.util.Dom.addClass(L,this.CLASSNAME);}this.setAttributeConfig("tabs",{value:[],readOnly:true});this._tabParent=this.getElementsByClassName(this.TAB_PARENT_CLASSNAME,"ul")[0]||G.call(this);this._contentParent=this.getElementsByClassName(this.CONTENT_PARENT_CLASSNAME,"div")[0]||C.call(this);this.setAttributeConfig("orientation",{value:J.orientation,method:function(M){var N=this.get("orientation");this.addClass("yui-navset-"+M);if(N!=M){this.removeClass("yui-navset-"+N);}switch(M){case"bottom":this.appendChild(this._tabParent);break;}}});this.setAttributeConfig("activeIndex",{value:J.activeIndex,method:function(M){this.set("activeTab",this.getTab(M));},validator:function(M){return !this.getTab(M).get("disabled");}});this.setAttributeConfig("activeTab",{value:J.activeTab,method:function(N){var M=this.get("activeTab");if(N){N.set("active",true);this._configs["activeIndex"].value=this.getTabIndex(N);}if(M&&M!=N){M.set("active",false);}if(M&&N!=M){this.contentTransition(N,M);}else{if(N){N.set("contentVisible",true);}}},validator:function(M){return !M.get("disabled");}});if(this._tabParent){B.call(this);}this.DOM_EVENTS.submit=false;this.DOM_EVENTS.focus=false;this.DOM_EVENTS.blur=false;for(var K in this.DOM_EVENTS){if(YAHOO.lang.hasOwnProperty(this.DOM_EVENTS,K)){this.addListener.call(this,K,this.DOMEventHandler);}}};var B=function(){var Q,L,P;var O=this.get("element");var N=A(this._tabParent);var K=A(this._contentParent);for(var M=0,J=N.length;M<J;++M){L={};if(K[M]){L.contentEl=K[M];}Q=new YAHOO.widget.Tab(N[M],L);this.addTab(Q);if(Q.hasClass(Q.ACTIVE_CLASSNAME)){this._configs.activeTab.value=Q;this._configs.activeIndex.value=this.getTabIndex(Q);}}};var I=function(J){var K=document.createElement("div");if(this.CLASSNAME){K.className=this.CLASSNAME;}return K;};var G=function(J){var K=document.createElement("ul");if(this.TAB_PARENT_CLASSNAME){K.className=this.TAB_PARENT_CLASSNAME;}this.get("element").appendChild(K);return K;};var C=function(J){var K=document.createElement("div");if(this.CONTENT_PARENT_CLASSNAME){K.className=this.CONTENT_PARENT_CLASSNAME;}this.get("element").appendChild(K);return K;};var A=function(M){var K=[];var N=M.childNodes;for(var L=0,J=N.length;L<J;++L){if(N[L].nodeType==1){K[K.length]=N[L];}}return K;};})();(function(){var E=YAHOO.util.Dom,J=YAHOO.util.Event;var B=function(L,K){K=K||{};if(arguments.length==1&&!YAHOO.lang.isString(L)&&!L.nodeName){K=L;L=K.element;}if(!L&&!K.element){L=H.call(this,K);}this.loadHandler={success:function(M){this.set("content",M.responseText);},failure:function(M){}};B.superclass.constructor.call(this,L,K);this.DOM_EVENTS={};};YAHOO.extend(B,YAHOO.util.Element);var F=B.prototype;F.LABEL_TAGNAME="em";F.ACTIVE_CLASSNAME="selected";F.ACTIVE_TITLE="active";F.DISABLED_CLASSNAME="disabled";F.LOADING_CLASSNAME="loading";F.dataConnection=null;F.loadHandler=null;F._loading=false;F.toString=function(){var K=this.get("element");var L=K.id||K.tagName;return"Tab "+L;};F.initAttributes=function(K){K=K||{};B.superclass.initAttributes.call(this,K);var M=this.get("element");this.setAttributeConfig("activationEvent",{value:K.activationEvent||"click"});this.setAttributeConfig("labelEl",{value:K.labelEl||G.call(this),method:function(N){var O=this.get("labelEl");if(O){if(O==N){return false;}this.replaceChild(N,O);}else{if(M.firstChild){this.insertBefore(N,M.firstChild);}else{this.appendChild(N);}}}});this.setAttributeConfig("label",{value:K.label||D.call(this),method:function(O){var N=this.get("labelEl");
if(!N){this.set("labelEl",I.call(this));}C.call(this,O);}});this.setAttributeConfig("contentEl",{value:K.contentEl||document.createElement("div"),method:function(N){var O=this.get("contentEl");if(O){if(O==N){return false;}this.replaceChild(N,O);}}});this.setAttributeConfig("content",{value:K.content,method:function(N){this.get("contentEl").innerHTML=N;}});var L=false;this.setAttributeConfig("dataSrc",{value:K.dataSrc});this.setAttributeConfig("cacheData",{value:K.cacheData||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("loadMethod",{value:K.loadMethod||"GET",validator:YAHOO.lang.isString});this.setAttributeConfig("dataLoaded",{value:false,validator:YAHOO.lang.isBoolean,writeOnce:true});this.setAttributeConfig("dataTimeout",{value:K.dataTimeout||null,validator:YAHOO.lang.isNumber});this.setAttributeConfig("active",{value:K.active||this.hasClass(this.ACTIVE_CLASSNAME),method:function(N){if(N===true){this.addClass(this.ACTIVE_CLASSNAME);this.set("title",this.ACTIVE_TITLE);}else{this.removeClass(this.ACTIVE_CLASSNAME);this.set("title","");}},validator:function(N){return YAHOO.lang.isBoolean(N)&&!this.get("disabled");}});this.setAttributeConfig("disabled",{value:K.disabled||this.hasClass(this.DISABLED_CLASSNAME),method:function(N){if(N===true){E.addClass(this.get("element"),this.DISABLED_CLASSNAME);}else{E.removeClass(this.get("element"),this.DISABLED_CLASSNAME);}},validator:YAHOO.lang.isBoolean});this.setAttributeConfig("href",{value:K.href||this.getElementsByTagName("a")[0].getAttribute("href",2)||"#",method:function(N){this.getElementsByTagName("a")[0].href=N;},validator:YAHOO.lang.isString});this.setAttributeConfig("contentVisible",{value:K.contentVisible,method:function(N){if(N){this.get("contentEl").style.display="block";if(this.get("dataSrc")){if(!this._loading&&!(this.get("dataLoaded")&&this.get("cacheData"))){A.call(this);}}}else{this.get("contentEl").style.display="none";}},validator:YAHOO.lang.isBoolean});};var H=function(K){var O=document.createElement("li");var L=document.createElement("a");L.href=K.href||"#";O.appendChild(L);var N=K.label||null;var M=K.labelEl||null;if(M){if(!N){N=D.call(this,M);}}else{M=I.call(this);}L.appendChild(M);return O;};var G=function(){return this.getElementsByTagName(this.LABEL_TAGNAME)[0];};var I=function(){var K=document.createElement(this.LABEL_TAGNAME);return K;};var C=function(K){var L=this.get("labelEl");L.innerHTML=K;};var D=function(){var K,L=this.get("labelEl");if(!L){return undefined;}return L.innerHTML;};var A=function(){if(!YAHOO.util.Connect){return false;}E.addClass(this.get("contentEl").parentNode,this.LOADING_CLASSNAME);this._loading=true;this.dataConnection=YAHOO.util.Connect.asyncRequest(this.get("loadMethod"),this.get("dataSrc"),{success:function(K){this.loadHandler.success.call(this,K);this.set("dataLoaded",true);this.dataConnection=null;E.removeClass(this.get("contentEl").parentNode,this.LOADING_CLASSNAME);this._loading=false;},failure:function(K){this.loadHandler.failure.call(this,K);this.dataConnection=null;E.removeClass(this.get("contentEl").parentNode,this.LOADING_CLASSNAME);this._loading=false;},scope:this,timeout:this.get("dataTimeout")});};YAHOO.widget.Tab=B;})();YAHOO.register("tabview",YAHOO.widget.TabView,{version:"2.5.2",build:"1076"});YAHOO.namespace("Oodle.ListingAction");

YAHOO.Oodle.PopupAction =
{
	mapImpl : 'google',

	setMapImple : function(mapImpl)
	{
		YAHOO.Oodle.PopupAction.mapImpl = mapImpl;
	},

	hideResultMsg:function(divID)
	{
		var msgElemnt = document.getElementById(divID);

		if (msgElemnt)
		{
			msgElemnt.style.display = 'none';
		}
	},

	updateMsg:function(msg, listingID, timeOut)
	{
		var divID = listingID + '-action-result';
		var msgElemnt = document.getElementById(divID);

		if (msgElemnt)
		{
			msgElemnt.style.display = 'block';
			msgElemnt.innerHTML = msg;
			if (timeOut > 0)
			{
				var timeoutID = setTimeout("YAHOO.Oodle.PopupAction.hideResultMsg('" + divID + "')", timeOut);
				//clearTimeout(timeoutID)
			}
		}
	},

	listingAction:function(listingID, action, source, partner)
	{
		var handleSuccess = function (o) {
			try {
	   			var formData = YAHOO.lang.JSON.parse(o.responseText);
	   			if (formData.result)
	   			{
					YAHOO.Oodle.PopupAction.updateMsg(formData.result, listingID, 7000);
	   			}
				else
					YAHOO.Oodle.PopupAction.updateMsg(formData.error['*'], listingID, 7000);
			}
			catch (e)
			{
			    // Unable to parse data
			    YAHOO.Oodle.PopupAction.updateMsg('Unable to parse response.', listingID, 7000);
			}
		}

		var callback =
		{
			success: handleSuccess,
			failure: this.handleFailure,
			timeout: 45000
		}

		var cObj = YAHOO.util.Connect.asyncRequest(
			'POST',
			'/ajax/listingaction/?action=admin&source=' + source +
			'&type=' + action +'&listing_id=' + listingID + '&partner=' + partner,
			callback);
	},

	loadMapDivForMapQuest:function(mapDiv, data)
	{
		var lat = data.lat;
		var lng = data.lng;
		var rough = data.rough;

		if (rough) {
			var mapMessageDiv = document.createElement('div');
			mapMessageDiv.innerHTML = 'Indicated location is approximate';
			mapMessageDiv.className = "map-message";
			mapDiv.appendChild(mapMessageDiv);
		}

		var gMapDiv = document.createElement('div');
		gMapDiv.style.width = data.width;
		gMapDiv.style.height = data.height;
		gMapDiv.className = "map-div";
		gMapDiv.id = "tidy-mq-map";

		var listingPoiCollection = new MQA.ShapeCollection();
		var point = new MQA.LatLng(lat,lng);
		listingMapIcon = new MQA.Icon("http://i.oodleimg.com/a/maps/icon.png",14,24);
		var marker = new MQA.Poi(point);
        marker.setValue('infoTitleHTML',data.desc);
		marker.setValue('key',data.id);
		marker.setValue('icon',listingMapIcon);

		myMapInit = new MQA.MapInit();
		myMapInit.setBestFitRect(listingPoiCollection.getBoundingRect());
		mq_listings_map = new MQA.TileMap(gMapDiv, 9, new MQA.LatLng(lat, lng), "map", myMapInit);
		mq_listings_map.setCenter(point);
		mq_listings_map.addShape(marker);
		mapDiv.appendChild(gMapDiv);

	},

	loadMapDiv:function(mapDiv, data)
	{
		var lat = data.lat;
		var lng = data.lng;
		var rough = data.rough;

		if (rough) {
			var mapMessageDiv = document.createElement('div');
			mapMessageDiv.innerHTML = 'Indicated location is approximate';
			mapMessageDiv.className = "map-message";
			mapDiv.appendChild(mapMessageDiv);
		}

		var gMapDiv = document.createElement('div');
		gMapDiv.style.width = data.width;
		gMapDiv.style.height = data.height;
		gMapDiv.className = "map-div";

		mapDiv.appendChild(gMapDiv);
		var gmap = new GMap2(gMapDiv);

		gmap.setCenter(new GLatLng(lat, lng), 13);
		GEvent.addListener(gmap, "moveend", function()
		{
			gmap.panTo(new GLatLng(lat, lng));
		});

		gmap.addControl(new GSmallZoomControl());

		var pin = new GIcon();

		pin.shadow = "http://i.oodleimg.com/a/maps/shadow.png";
		if (rough)
			pin.shadow = "http://i.oodleimg.com/a/maps/shadow_rough.png";
		pin.shadowSize = new GSize(22, 24);
		pin.iconSize = new GSize(14, 24);
		pin.iconAnchor = new GPoint(7, 22);
		pin.infoWindowAnchor = new GPoint(7, 5);
		pin.image = "http://i.oodleimg.com/a/maps/icon.png";
		if (rough) {
			pin.image = "http://i.oodleimg.com/a/maps/icon_rough.png";
		}

		var marker = new GMarker(new GLatLng(lat, lng), pin);
		gmap.addOverlay(marker);
	},

	handleDataSuccess:function(o)
	{
		var listingID = o.argument[1];
  		var bd = o.argument[0];
  			var html = o.argument[3];

		var data = YAHOO.lang.JSON.parse(o.responseText);
  		bd.style.background = 'white';
  		if (o.argument[3])
  		{
  			bd.innerHTML = data.html + html;
  		}
  		else
  		{
			bd.innerHTML = data.html;
  		}

		var tabView = YAHOO.Oodle.PopupAction.createTabs(listingID);

	    var container = $(listingID + '-popup');
	    tabView.appendTo(container);

	    var handleActiveTabChange = function(e, listingID)
	    {
	    	var tab = e.newValue;
	    	var reCaptcha = listingID + '-' + tab.viewType + '-captcha';
	    	var reCaptchaEl = $(reCaptcha);
	    	if (reCaptchaEl) {
	    		Recaptcha.create(data.captchakey, reCaptcha, {theme: "red"});
	    	}
	    }

	    tabView.addListener('activeTabChange', handleActiveTabChange, listingID);
		tabView.set('activeIndex', o.argument[2]);
		YAHOO.Oodle.PopupAction["tab-" + listingID] = tabView;

		// Set up domain proxy for contact form
		var domainDiv = $(listingID + '-domain');
		if (domainDiv)
		{
			domainDiv.value = window.location.hostname;
		}

		var mapDiv = $('popup-map-' + listingID);
		if (mapDiv)
		{
			if (YAHOO.Oodle.PopupAction.mapImpl == 'mapquest')
			{
				YAHOO.Oodle.PopupAction.loadMapDivForMapQuest(mapDiv, data.map);
			}
			else
			{
				var loadMapFunc = function()
				{
					if (!window.GBrowserIsCompatible ||
				    !window.GControl ||
				    !window.GMap2)
					{
						setTimeout(loadMapFunc, 200);
						return;
					}

					YAHOO.Oodle.PopupAction.loadMapDiv(mapDiv, data.map);
				};

				LazyLoad.loadOnce(['http://img.oodle.com/jaml/lazyloadmap/1242837454'], loadMapFunc, null, null, true);
			}
		}
	},

	init:function(listingID, activeTabIndex, html, page, category, tabName)
	{
		YAHOO.Oodle.Dialog.hide();
		var cmReport = tabName + '-_-' + page + '-_-' + category;
		cmCreateManualLinkClickTag('/event-conversion.php?cm_sp=' + cmReport);

		var divID = 'listing-detail-popup-' + listingID;
		var popupEl = $(divID);
		if (!popupEl)
		{
			popupEl = document.createElement('div');
			popupEl.id = divID;
			popupEl.className = "yui-skin-sam pop-up";

			var bd =  document.createElement('div');
			bd.id = divID + '-bd';
			bd.style.height = '490px'
			bd.className = "bd";
			popupEl.appendChild(bd);
			bd.style.background = 'url(http://i.oodleimg.com/a/lightbox-loading.gif) 50% 50% no-repeat white';

			var callback =
			{
			  success: YAHOO.Oodle.PopupAction.handleDataSuccess,
			  failure: function(o, bd) {
			  		bd = o.argument[0];
			  		bd.style.background = "white";
			  		bd.innerHTML = 'Oops! There was a communication error. Please reload your page and try again.'
			  	},
			  timeout: 5000,
			  argument: [bd, listingID, activeTabIndex, html]
			}
			sUrl = '/ajax/popup/?listing_id=' + listingID + '&page=' + page;
			YAHOO.util.Connect.asyncRequest('GET', sUrl, callback);
		}
		else
		{
			YAHOO.Oodle.PopupAction["tab-" + listingID].set('activeIndex', activeTabIndex);
		}

		var popupModal = new YAHOO.widget.Dialog(
				popupEl,
				{	width: '480px',
					fixedcenter: true,
					draggable : true,
					zIndex : 999999999,
					underlay : 'shadow',
					modal : true,
					iframe: true,
					hideaftersubmit: true,
					effect : {effect:YAHOO.widget.ContainerEffect.FADE,duration:0.50}
				});

		document.body.className = "yui-skin-sam"
		var hiddenEl = $('hiddenmodals');

		if (!bd) {
			bd = $(divID + '-bd');
		}

		if (bd)
		{
			bd.style.display = 'block';
			popupModal.cancelEvent.fire = function() {
				bd.style.display = 'none';
			}
		}

		popupModal.render(hiddenEl);
		popupModal.show();

		if (YAHOO.Oodle.PopupAction.currentModal &&
			YAHOO.Oodle.PopupAction.currentModal != popupModal)
		{
			YAHOO.Oodle.PopupAction.currentModal.hide();
		}
		YAHOO.Oodle.PopupAction.currentModal = popupModal;
	},

	createTabs:function(listingID)
	{
		var myTabs = new YAHOO.widget.TabView();

		var tabs = {
			details: 'Details',
			md: 'Market Data',
			contact: 'Contact Seller',
			share: 'Share',
			report: 'Report'};

		var tabIndex = 0;
		for (index in tabs)
		{
			var tabID = listingID + '-' + index;
			var tabEl = $(tabID);

			if (tabEl)
			{
				var tabObj = new YAHOO.widget.Tab({
						        label:  '<span id="' + index +'-label">' + tabs[index] + '</span>',
						        contentEl: tabEl
						    });

				tabObj.viewType = index;
			    myTabs.addTab(tabObj);
			}
		}

		YAHOO.widget.Tab.prototype.ACTIVE_TITLE = '';
		return myTabs;
	},

	resetShareListing:function(listingID, email)
	{
		YAHOO.Oodle.ListingAction.setValue('frm_send_friend-friend_email', '');
		YAHOO.Oodle.ListingAction.setValue('frm_send_friend-subject', '');
		YAHOO.Oodle.ListingAction.setValue('frm_send_friend-message', '');
		YAHOO.Oodle.ListingAction.setValue('frm_send_friend-your_email', email);
		YAHOO.Oodle.ListingAction.setValue('frm_send_friend-listing_id', listingID);
		YAHOO.Oodle.ListingAction.setTitle('email-listing-title', listingID);
	},

	submitShareWithFriend:function(listingID)
	{
		var handleSuccess = function(data)
		{
			if (data.result)
			{
				var listingID = YAHOO.Oodle.PopupAction.listingID;
				var resultEl = $(listingID + '-share-result');
				var formEl = $(listingID + '-share-form');

				resultEl.innerHTML = data.result;
				resultEl.style.display = 'block';
				formEl.style.display = 'none';
			}
			else
			{
				Recaptcha.reload();
			}
		}

		YAHOO.Oodle.PopupAction.listingID = listingID;
		YAHOO.Oodle.AjaxFormObject.startRequest(
				'share-' + listingID,
				'/ajax/listingaction/?action=emailfriend',
				handleSuccess);
	},

	submitContact:function(listingID)
	{
		var handleSuccess = function(data)
		{
			if (data.result)
			{
				var listingID = YAHOO.Oodle.PopupAction.listingID;
				var resultEl = $(listingID + '-contact-result');
				var formEl = $(listingID + '-contact-form');

				if (data.result.redirect)
				{
					YAHOO.Oodle.ListingAction.report.hide();
					var listingID = data.result.redirect;
					if (element)
					{
						var url = element.attributes.getNamedItem("href").value;
						window.location = url;
					}
				}
				else
				{
					resultEl.innerHTML = data.result.msg;
					resultEl.style.display = 'block';
					formEl.style.display = 'none';
				}
			}
			else
			{
				Recaptcha.reload();
			}
		}

		YAHOO.Oodle.PopupAction.listingID = listingID;
		YAHOO.Oodle.AjaxFormObject.startRequest(
				'frm_contact_seller-' + listingID,
				'/ajax/listingaction/?action=contact',
				handleSuccess);
	},

	submitReportListing:function(listingID)
	{
		var handleSuccess = function(data)
		{
			if (data.result)
			{
				var listingID = YAHOO.Oodle.PopupAction.listingID;
				var resultEl = $(listingID + '-report-result');
				var formEl = $(listingID + '-report-form');

				if (data.result.redirect)
				{
					YAHOO.Oodle.ListingAction.report.hide();
					var listingID = data.result.redirect;
					if (element)
					{
						var url = element.attributes.getNamedItem("href").value;
						window.location = url;
					}
				}
				else
				{
					resultEl.innerHTML = data.result.msg;
					resultEl.style.display = 'block';
					formEl.style.display = 'none';
				}
			}
		}

		YAHOO.Oodle.PopupAction.listingID = listingID;
		YAHOO.Oodle.AjaxFormObject.startRequest(
				'listing_report-' + listingID,
				'/ajax/listingaction/?action=report',
				handleSuccess);
	}
}
