﻿function ConfirmDelete(){return confirm("Are you sure you want to delete the selected item ?");}
function OpenWindow(url, width, height, features){
    if (features != "") features += ","; 
    window.open(url, "newWin", features + "width=" + width + ",height=" + height);
}
function EmailPage(Email, Subject, PageLocation) {	
	var MsgBody;
	PageLocation = PageLocation.replace('http://', 'https://')
	PageLocation = escape(eval("'" + PageLocation + "'")).replace(/\+/g, '%2B').replace(/\"/g,'%22').replace(/\'/g, '%27');
	MsgBody = PageLocation;
	window.location = "mailto:" + Email + "?subject=:: " + Subject + " :: &body=" + MsgBody;
}
function PrintPage() {	
	if (window.print)
		window.print();
	else
	    alert("Sorry, your browser doesn't support this feature.");
}
function SendToDetailsPage(pageName, id) {
    var x = 0, y = 0;
    if( typeof( window.pageYOffset ) == 'number' ) {
        // Netscape
        x = window.pageXOffset;
        y = window.pageYOffset;
    } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
        // DOM
        x = document.body.scrollLeft;
        y = document.body.scrollTop;
    } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
        // IE6 standards compliant mode
        x = document.documentElement.scrollLeft;
        y = document.documentElement.scrollTop;
    }    
    document.location.href = pageName + "?id=" + id + "&x=" + x + "&y=" + y;
}   