




function zpbw_apiCall(apiName, webWidgetClientKey, articleUrl, callId) {
	try {
		var apiJsSrc = "http://www.pnyxe.co.il/PnyxeApi.jsp" +
						"?apiName=" + encodeURIComponent(apiName) +
						"&webWidgetClientKey=" + encodeURIComponent(webWidgetClientKey) +
						"&articleUrl=" + encodeURIComponent(articleUrl) +
						"&callId=" + encodeURIComponent(callId);
	
		var apiJsElement = document.createElement("script");
		apiJsElement.setAttribute("type", "text/javascript");
		apiJsElement.setAttribute("language", "javascript");
		apiJsElement.setAttribute("src", apiJsSrc);
	
		var thisScriptElement = document.getElementById("zpbw_apiJs");
		if (thisScriptElement == null) {
			thisScriptElement = document.getElementById("pnyxeApiJs"); // Backwards compatibility
		}
		thisScriptElement.parentNode.insertBefore(apiJsElement, thisScriptElement);
	} catch (e) {
	}
}

// Backwards compatibility
function pnyxeApiCall(apiName, webWidgetClientKey, articleUrl, callId) {
	zpbw_apiCall(apiName, webWidgetClientKey, articleUrl, callId);
}
