//***PLACE THE FOLLOWING JS CALL INTO THE HEAD OF PAGE TO BE PROTECTED***
//<script type="text/javascript" language="javascript" src="disright.js"></script>

//***PLACE THE FOLLOWING LINES OF CODE BETWEEN JS TAGS IN THE PAGE TO BE PROTECTED***
//var message="Images on this page are copyright of\n\n    '<?php echo "$BusName" ?>'.\n\n"+"Please do not copy without permission."; 
//document.onmousedown=IE;
//document.onmouseup=NS;
//document.oncontextmenu=new Function("return false");

//***TO DISABLE THE RIGHT CLICK SCRIPTS SET IE TO IEx***

function detail()
	{
	 alert(message); 
	 return false;
	}

function IE()
	{
	 if (event.button == "2" || event.button == "3")
		{
		 detail();
		}
	}
function NS(e)
	{
	 if (document.layers || (document.getElementById && !document.all))
		{
		 if (e.which == "2" || e.which == "3")
			{
			 detail();
			}
		}
	}




//***BEGIN SCRIPT TO PREVENT DRAG AND DROP OF IMAGES WITH CLASS SECIMG***

function add_event ( element, event_name, p_function ) {
	if (window.attachEvent) {
		element.attachEvent( 'on' + event_name, p_function );
		}
	else if (window.addEventListener) {
		element.addEventListener( event_name, p_function, false );
		}
	else {
		}
	}


var none_for_images = function ( event_obj ) {
	//alert(1);
	var element = null;
	if (typeof( event ) != "undefined") {
		element = event.srcElement;
		}
	else {
		element = event_obj.target;
		}
	var rv = true;
	for (;;) {
		if (element == null) break;
		if (!element.className) break;
		if (element.className != "secImg") break;
		rv = false;
		break;
		}
	if (!rv) {
		//alert( 'break' );
		if (event_obj.preventDefault) {
			event_obj.preventDefault();//netscape
			}
		}
	return rv;
	};


var ga_onload = new Array();
function g_onload () {
	for (var i = 0; i < ga_onload.length; i++) {
		var this_function = ga_onload[i];
		this_function();
		}
	};


add_event( document, 'contextmenu', none_for_images );
add_event( document, 'dragstart', none_for_images );

/* mousedown prevents drag-n-drop in FF3 */
add_event( document, 'mousedown', none_for_images );

add_event( window, 'load', g_onload );


//***END SCRIPT TO PREVENT DRAG AND DROP OF IMAGES WITH CLASS SECIMG***
