/*
 * SimpleModal Confirm Modal Dialog
 * http://www.ericmmartin.com/projects/simplemodal/
 * http://code.google.com/p/simplemodal/
 *
 * Copyright (c) 2009 Eric Martin - http://ericmmartin.com
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Revision: $Id: confirm.js 212 2009-09-03 05:33:44Z emartin24 $
 *
 */


/*
function confirm(message, callback) {
	$('#confirm').modal({
		closeHTML:"<a href='#' title='Close' class='modal-close'>X</a>",
		position: ["20%",],
		overlayId:'confirm-overlay',
		containerId:'confirm-container', 
		onShow: function (dialog) {
			$('.message', dialog.data[0]).append(message);

			// if the user clicks "yes"
			$('.yes', dialog.data[0]).click(function () {
				// call the callback
				if ($.isFunction(callback)) {
					callback.apply();
				}
				// close the dialog
				$.modal.close();
			});
		}
	});
}
*/
var loading = '<div id="loading" style="position:absolute; width:100%;height:100%; text-align:center; background-color:#fff;z-index:100"> <img src="../Images/loading.gif" border="0" alt="Yükleniyor" style="margin-top:20px" /> </div> ';
var loadingChild = '<div id="loading" style="position:absolute; width:100%;height:100%; text-align:center; background-color:#fff;z-index:100"> <img src="../../Images/loading.gif" border="0" alt="Yükleniyor" style="margin-top:20px" /> </div> ';

function openModal(src) {
    $.modal('<iframe id="ModalFrame" allowTransparency="true" src="' + src + '" height="580" width="570" frameborder="0" style="border:0;" scrolling=no />', {
    onOpen:function (dialog) {
	dialog.overlay.fadeIn('slow', function () {
		dialog.data.hide();
		dialog.container.fadeIn('slow', function () {
			dialog.data.slideDown('slow');
		});
	});},
	onClose: function (dialog) {
	dialog.data.fadeOut('slow', function () {
		dialog.container.hide('slow', function () {
			dialog.overlay.slideUp('slow', function () {
				$.modal.close();
			});
		});
	});},	
	closeHTML: "",
        containerCss: {
            height: 580,
            padding: 0,
            width: 570
        },
        overlayClose: true    
    });
	
	
}

function openModalSize(src, wt, ht) {
	
    $.modal('<iframe id="ModalFrame" allowTransparency="true" src="' + src + '"  height="' + String(ht) + '" width="' + String(wt) + '" frameborder="0" style="border:0" scrolling=no />' , {
        closeHTML: "",
        containerCss: {
            height: ht,
            padding: 0,
            width: (wt +17)
        },
        overlayClose: true
    });
}


