// Copyright 2004 - 2011, Productive Technologies LLC
// 06/20/11 13:33

var OMCUrlRoot=location.href.match(/(.+\/omc\/)/i)?RegExp.$1:"http://OnMyCalendar.com/";
function OMCInsertCalendarJS(K,P){OMCIns.Calendar(K,P);}
function OMCInsertCalendar(K,P,A){OMCIns.CalendarIF(K,P,A);}
function OMCInsertBlockJS(K,InclTitle){OMCIns.Block(K,InclTitle);}
var OMCIns=new function(){var JS="&OL=JS",t1="<script type='text/javascript' src='",t2="CalServices/";
this.Calendar=function(BK,PW){var CDt=((z=location.search.match(/OMCUS=[^&]+/))==null)?"":"&"+z[0];LdJS("GetCalendar.aspx?BK="+BK+"&PW="+PW+JS+CDt);}
this.CalendarIF=function(BK,PW,A){LdIF("GetCalendar.aspx?BK="+BK+"&PW="+PW,A);}
this.Block=function(BK,T){LdJS("GetBlock.aspx?BK="+BK+JS+Ti(T));}
this.Form=function(BK,T){LdFcn("JaForm","JaForm.js");LdJS("GetForm.aspx?BK="+BK+JS+Ti(T));}
this.FormIF=function(BK,T,A){LdIF("GetForm.aspx?BK="+BK+Ti(T),A);}
function Ti(T){return((typeof(T)!='undefined'&&T)?"&T=Y":"");}
function LdFcn(X,S){if(typeof(window[X])!="object")document.write(t1+OMCUrlRoot+"Common/"+S+"?JSV="+(new Date().getTime()/172800000|0)+"'><\/script>");}
function LdJS(S){document.write(t1+OMCUrlRoot+t2+S+"'><\/script>");}
function LdIF(S,A){document.write("<iframe "+A+" src='"+OMCUrlRoot+t2+S+"'><\/iframe>");}}

