/*
*************************************************************************
*	Sample of Open Window 												*
*************************************************************************
function openADViewWindow(ad_id, width, height){
	if(ad_id!=0){
		var args = 'width='+(String)(parseFloat(width)+20)+',height='+(String)(parseFloat(height)+20)+',status=0,address=0,resize=0';
		var popwindow = window.open('index.php?view=ad_view&ad_id='+ad_id,'ad_stat', args);
		if(!popwindow){
			alert("Your POP UP Blocker blocking a new window\n\nPlease disable any POP UP Blocker,\nor hold down CNTRL key while clicking on button/link");
		}
	}else{
		alert('Invalid operation !!');
	}
}
*************************************************************************


*************************************************************************
*	Sample of Ajax Usage												*
*************************************************************************
function toggle_user_status(user_id, stat){
	if(user_id!=0 && (stat==0 || stat==1)){
		new ajax ('ajax.php', {postBody: 'method=toggle_user_status&user_id='+user_id+'&stat='+stat, onComplete: toggle_user_status_callback});
		document.getElementById("WAIT").style.left = (Screen.getViewportWidth()/2 - (300/2))+"px";
		document.getElementById("WAIT").style.top = (Screen.getScrollTop()+(Screen.getViewportHeight()/2)-50)+"px";
		document.getElementById("WAIT").style.display = '';
		document.getElementById("COVER").style.display = '';
		document.getElementById("COVER").style.height = Screen.getDocumentHeight()+'px';
	}else{
		alert("Invalid operation. Please try later on !!");
	}
}

function toggle_user_status_callback(request, uservar){
	document.getElementById("WAIT").style.display = 'none';
	document.getElementById("COVER").style.display = 'none';
	if(request!=null){
		if(request.responseText=="OK"){
			alert("The users status has been changed successfully !!\n\nYou need to refresh this page to see the updated status");
			window.location.reload();
		}else{
			alert("We were not able to process your request\n\nPlease try later on");
		}
	}else{
		alert("We were not able to process your request\n\nPlease try later on");
	}
}
*************************************************************************
*/

