var modalWindow = {
		parent:"body",
		windowId:null,
		content:null,
		width:null,
		height:null,
		close:function(){
			jQuery(".modal-window").remove();
       	 	jQuery(".modal-overlay").remove();
		},
    	open:function()	{
			var modal = "";
			modal += "<div class=\"modal-overlay\"></div>";
			modal += "<div id=\"" + this.windowId + "\" class=\"modal-window\" style=\"width:" + this.width + "px; height:" + this.height + "px; margin-top:-" + (this.height / 2) + "px; margin-left:-" + (this.width / 2) + "px;\">";
        	modal += this.content;
        	modal += "</div>";   
   			jQuery(this.parent).append(modal);
   			jQuery(".modal-window").append("<a class=\"close-window\"></a>");
			jQuery(".close-window").click(function(){modalWindow.close();});
			jQuery(".modal-overlay").click(function(){modalWindow.close();});
    	}
	};
	var openMyModal = function(source,width,height){
		width=width||520;
		height=height||380;
    	//source+="&popup=popup";
    	modalWindow.windowId = "myModal";
    	modalWindow.width = width;
    	modalWindow.height = height;
    	modalWindow.content = "<iframe width='"+width+"' height='"+height+"' frameborder='0' scrolling='no' allowtransparency='true' src='" + source + "' style='width:"+width+"px;height:"+height+"px;min-height:"+height+"px'></iframe>";
    	modalWindow.open();
	};

	function registro(registerURL) {          		
    	openMyModal(registerURL,950,480);
    	/*var editArticuloWindow = window.open(editURL, 'edit', 'directories=no,height=600,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=600');
    	editArticuloWindow.focus();*/
	}

var closeMyModal = function(){
          modalWindow.close();
	};

