﻿function right(e) {
if (navigator.appName =='Netscape'&&
(e.which ==3|| e.which ==2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2|| event.button ==3)) {
return false;
}
return true;
}

if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;

document.oncontextmenu=noshowmenu;
function noshowmenu()
{
//return false
}
 	function getElementsByName_iefix(tag, name) 
	{
		var elem = document.getElementsByTagName(tag);
		var arr = new Array();

		for(i = 0,iarr = 0; i < elem.length; i++) 
		{ 

				arr[iarr] = elem[i];    
				iarr++; 

		}
		return arr;

	}

function PF_Hits(DBTable,Filed,Key){
	    var str='PF_Hits.asp?DBTable='+DBTable+'&Filed='+Filed+'&Key='+Key;
		xmlDoc=PF_LoadXML(str);
}	 

function PF_escape(S){
	return encodeURIComponent(S);
}


function PF_BannerOnclick(e){
var id="";
  	   if(e==null){
       		e=window.event;         
			id=e.srcElement.aa;
	   }else{
			id=e.originalTarget.aa;   	
	   }	
	
	if (id!='')
	PF_Hits('Board','ID',id);
	
}


function PF_getdata(requestURL,objname,pars) {    
	 jQuery.ajax({
		           type: "post",		        
			    url: requestURL,		
			    dataType: "html",
			    data: pars,
			    error: function(resp){
			    	//	alert('Error: url : ' + requestURL+'?'+pars+'\n'+resp.responseText); 	   
			    },
			     beforeSend:function(){	
				jQuery("#"+objname).html('Loading content, please wait..');
			    },			
			    success: function(resp){
					$("#"+objname).html(resp);
			     }
	 })					      
}

function PF_AjaxblockUI(requestURL,pars,title){
	if (requestURL==''){return ;}	
	 jQuery.ajax({
		           type: "post",		        
			    url: requestURL,		
			    dataType: "html",
			    data: pars,
			    error: function(resp){
                                     alert('Error: url : ' + requestURL+'?'+pars+'\n'+resp); 	   
			    },
			     beforeSend:function(){	
				//jQuery("#loading").toggle();
			    },			
			    error : function(XMLHttpRequest, textStatus) {   
			
			     },   
			    success: function(resp){
			    		 $.growlUI(title, resp); 

			     }
	 })
}
