/*
 * SimpleModal Basic Modal Dialog
 * http://www.ericmmartin.com/projects/simplemodal/
 * http://code.google.com/p/simplemodal/
 *
 * Copyright (c) 2008 Eric Martin - http://ericmmartin.com
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Revision: $Id: basic.js 132 2008-05-23 16:05:17Z emartin24 $
 *
 */
 
function getViewport(){var a={width:-1,height:-1};if(typeof window.innerWidth!="undefined"){a.width=window.innerWidth,a.height=window.innerHeight}else{if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){a.width=document.documentElement.clientWidth,a.height=document.documentElement.clientHeight}else{a.width=document.getElementsByTagName("body")[0].clientWidth,a.height=document.getElementsByTagName("body")[0].clientHeight}}return a}function parseXML(b){var a;if($.browser.msie){a=new ActiveXObject("Microsoft.XMLDOM");a.async=false;a.loadXML(b)}else{a=new DOMParser().parseFromString(b,"text/xml")}return a}$(document).ready(function(){$("a").click(function(f){var c=$("a").index(this);var d=$("a:eq("+c+")");var b=document.location.protocol+"//"+location.hostname+d.attr("href");if(d.attr("rel")=="modal"){f.preventDefault();$.ajax({url:b,type:"GET",dataType:"html",cache:true,success:function(g){var i=g.indexOf('<div id="public_rightcontainer"')+32;var e=g.indexOf("<!-- end -->");var h=g.substring(i,e);$("#frameLoad").append(h)}});var a=getViewport();$("#public_modal_content").css("height",(a.height*0.75));$("#public_modal_content").css("top",(a.height*0.1));$("#public_modal_content").modal()}})});