Login   Register  
PHP Classes
elePHPant
Icontem

File: resources/GurtCalendar.js

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Piotr Malinski  >  HTML Friends  >  resources/GurtCalendar.js  >  Download  
File: resources/GurtCalendar.js
Role: Auxiliary data
Content type: text/plain
Description: JS Scripts files
Class: HTML Friends
PHP wrapper to use dhtmlgoodies.com DHTML widgets
Author: By
Last change:
Date: 2006-02-19 08:11
Size: 10,108 bytes
 

Contents

Class file image Download
// Product title: Gurt JavaScript Calendar
// Product version details: 1.0.0, 11-06-2005 (mm-dd-yyyy) [compressed version]
// Product URL: http://gurtom.com/products/calendars/js
// Contact info: feedback@gurtom.com (specify product title in the subject)
// Notes: This script is free. Feel free to copy, use and change this script as 
// long as this head part remains unchanged.  Visit official site for details.
// Copyright: (c) 2005 by Gurtom.Com

var ALTCLS=[],objaUA,BC;function gurtCalendar(AP){var _=this;_.AE=ALTCLS.length;ALTCLS[_.AE]=_;if(!objaUA)objaUA=new Z();if(!BC)BC=new Y();_.Aw='dataArea'+_.AE;_.Aj='icoCls'+_.AE;_.BH='icoPos'+_.AE;_.AS='AB'+_.AE;_.Ag='clsGrid'+_.AE;_.BX='clsTitle'+_.AE;_.BG='AL'+_.AE;_.Az='AH'+_.AE;_.BJ='AN'+_.AE;_.BB='AJ'+_.AE;_.BF='AK'+_.AE;_.Ay='AG'+_.AE;_.BI='AM'+_.AE;_.BA='AI'+_.AE;_.u=new Date();_.w=!AP.dateFormat?'m/d/Y':AP.dateFormat;_.z=AP['appearance'];B(_);}function B(_){var Bp=new Bo();Bp.Au('<table cellpadding="0" cellspacing="0" border="0" ><tr><td><input type="Text" id="',_.Aw,'"  name="',_.Aw,'" value=""  class ="',_.z['DataArea'],'" ></td><td align="right" width="25"><a href="javascript:I(ALTCLS['+_.AE+']);" ><img src="',_.z['IcoCalVis'],'" alt="" name="'+_.Aj+'" id="'+_.Aj+'" width="23" height="19" border="0"></a></td></tr><tr><td align="left" colspan="2"><img src="resources/images/spacer.gif" alt="" name="'+_.BH+'" id="'+_.BH+'" width="1" height="1" border="0"></td></tr></table>');document.write(Bp.BE());A(_);M(_);P(_);}function A(_){var Bp=new Bo();Bp.Au('<div  id="',_.AS,'"  name="',_.AS,'"  style="position: absolute; background-color:beige; visibility:hidden;  width:186; height:1; z-index: ',_.AE+1,'"><table  width="100%" cellpadding="0" cellspacing="1" border="0" class="',_.z['OuterFrame'],'"><tr><td ><table  width="100%" cellpadding="0" cellspacing="0" border="0" class="',_.z['InnerFrame'],'"  ><tr><td  colspan="3" class="',_.z['TopPartNavpanel'],'"><img src="resources/images/spacer.gif" width="1 px" height="1 px"></td></tr><tr><td  width="100%"  colspan="3" class="',_.z['Navpanel'],'"><table cellpadding="1" cellspacing="1" border="0" ><tr><td><a href="#" name="',_.BI,'" id="',_.BI,'"><img src="',_.z['PrevYear'],'" alt="',_.z['messages']['AltPrevYear'],'" name="',_.BJ,'" id="',_.BJ,'" width="18" height="21" border="0"></a></td><td><a href="#" name="',_.BF,'" id="',_.BF,'"><img src="',_.z['PrevMonth'],'" alt="',_.z['messages']['AltPrevMonth'],'" name="',_.BG,'" id="',_.BG,'" width="18" height="21" border="0"></a></td><td  width="100%" class="',_.z['InfoTitle'],'" id="',_.BX,'" name="',_.BX,'">',_.z['longmonth'][_.u.getMonth()],'&nbsp;',_.u.getFullYear(),'</td><td><a href="#" name="',_.Ay,'" id="',_.Ay,'"><img src="',_.z['NextMonth'],'" alt="',_.z['messages']['AltNextMonth'],'" name="',_.Az,'" id="',_.Az,'" width="18" height="21" border="0"></a></td><td><a href="#" name="',_.BA,'" id="',_.BA,'"><img src="',_.z['NextYear'],'" alt="',_.z['messages']['AltNextYear'],'" name="',_.BB,'" id="',_.BB,'" width="18" height="21" border="0"></a></td></tr></table></td></tr><tr><td colspan="3" class="',_.z['BottomPartNavpanel'],'"><img src="resources/images/spacer.gif" width="1 px" height="1 px"></td></tr><tr class="',_.z['MidRow'],'"><td><img src="resources/images/spacer.gif"  width="4 px"height="1 px"></td><td  align="center" id="',_.Ag,'" name="',_.Ag,'">',O(_),'</td><td width="4 px"><img src="resources/images/spacer.gif"  width="4 px" height="1 px"></td></tr><tr><td colspan="3" class="',_.z['BottomPartNavpanel'],'"><img src="resources/images/spacer.gif" width="1 px" height="1 px"></td></tr></table></td ></tr></table></div>');if(objaUA.Ao){Bp.Au('<iframe id="IE6bug',_.AS,'" src="resources/images/spacer.gif"  name="IE6bug',_.AS,'" style="position: absolute; left:0; top:0; width:0; height:0; visibility:hidden; filter:alpha(opacity=0); z-index: ',_.AE,'"></iframe>');}document.write(Bp.BE());}function C(As){var B_=As?new Date(As):new Date();B_.setHours(0);B_.setMinutes(0);B_.setSeconds(0);B_.setMilliseconds(0);return B_;}function D(c,As){var BM=1;var B_=new Date(As);B_=C(B_);var Bd=c.u;if(C(Bd).valueOf()==B_.valueOf())BM|=2;if(B_.getMonth()!=Bd.getMonth()||B_.getFullYear()!=Bd.getFullYear())BM|=8;if(B_.getDay()==0||B_.getDay()==6)BM|=4;return BM;}function I(_){if(objaUA.Ao)var BP=String(_.AC.style.visibility).toLowerCase();var BO=String(_.AB.style.visibility).toLowerCase();if(BO=='visible'||BO=='show'){_.AB.style.visibility='hidden';if(objaUA.Ao){_.AC.style.visibility='hidden';}_.AD.src=_.z['IcoCalVis'];}else{L(_);if(S(_))Q(_);_.AB.style.visibility='visible';if(objaUA.Ao){_.AC.style.width=_.AB.offsetWidth;_.AC.style.height=_.AB.offsetHeight;_.AC.style.visibility='visible';}_.AD.src=_.z['IcoCalUnVis'];}}function R(_,Aq,Bf){var BY=Aq?new Date(Aq):new Date(_.u);_.u=new Date(BY);if(!Bf){I(_);_.AA.value=BC.U(_.u,_.w);}Q(_);}function Q(_){P(_);_.AF.innerHTML=_.z['longmonth'][_.u.getMonth()]+'&nbsp;'+_.u.getFullYear();_.AQ.innerHTML='';_.AQ.innerHTML=O(_);}function M(_){var B_;_.AB=K(_,_.AS);if(objaUA.Ao)_.AC=K(_,'IE6bug'+_.AS);_.AD=K(_,_.Aj);_.AO=K(_,_.BH);_.AA=K(_,_.Aw);_.AQ=K(_,_.Ag);_.AF=K(_,_.BX);_.AL=K(_,_.BG);_.AH=K(_,_.Az);_.AN=K(_,_.BJ);_.AJ=K(_,_.BB);_.AK=K(_,_.BF);_.AG=K(_,_.Ay);_.AM=K(_,_.BI);_.AI=K(_,_.BA);}function N(As,BU,BS,BQ,BR,BT){var B_=new Date(As);if(BU)B_.setFullYear(B_.getFullYear()+BU);if(BS){B_.setMonth(B_.getMonth()+BS);}if(BQ){B_.setHours(B_.getHours()+BQ);}if(BR){B_.setMinutes(B_.getMinutes()+BR);}if(BT){B_.setSeconds(B_.getSeconds()+BT);}if(!(BQ||BR||BT)){if(B_.getDate()!=As.getDate()){B_.setDate(0);}}return B_.valueOf();}function P(_){_.AM.href="javascript:  R(ALTCLS["+_.AE+"],"+N(_.u,-1)+",2);";_.AI.href="javascript:  R(ALTCLS["+_.AE+"],"+N(_.u,1)+",2);";_.AK.href="javascript: R(ALTCLS["+_.AE+"],"+N(_.u,null,-1)+",1);";_.AG.href="javascript: R(ALTCLS["+_.AE+"],"+N(_.u,null,1)+",1);";}function S(_){if(_.AA.value){B_=BC.X(_.AA.value+'',_.w);if(!B_){alert(_.z['messages']['Warning']);B_=new Date()};if(B_.valueOf()!=_.u.valueOf()){_.u=new Date(B_);return true;}else{_.AA.value=BC.U(_.u,_.w);return false;}}else return false;}function H(o){var Bp=new Bo();Bp.Au('<tr  class="',o.z['WeekDay'],'">');for(var Ah=0;Ah<7;Ah++)Bp.Au('<td>',o.z.weekdays[(Ah+1)%7],'</td>');Bp.Au('</tr>');return(Bp.BE());}function G(a){var Bp=new Bo();var Ad=new Date(a.u);Ad.setDate(1);Ad.setDate(1-(7+Ad.getDay()-1)%7);var Ba=new Date(Ad);while(Ba.getMonth()==a.u.getMonth()||Ba.getMonth()==Ad.getMonth()){Bp.Au('<tr>');for(var Ah=0;Ah<7;Ah++){Bp.Au(F(a,Ba));Ba.setDate(Ba.getDate()+1);}Bp.Au('</tr>\n');}return(Bp.BE());}function O(_){var Bp=new Bo();Bp.Au('<table cellpadding="2"  cellspacing="1" border="0" width="100%"   class="',_.z['DateGrid'],'">');Bp.Au(H(_));Bp.Au(G(_));Bp.Au('</table>');return(Bp.BE());}function Z(){var _=this;var b=navigator.appName;var v=_.Bl=navigator.appVersion;var Bi=_.Bj=navigator.userAgent.toLowerCase();var BL=/opera/;_.BD=BL.exec(Bi)?true:false;_.Ak=(b=="Microsoft Internet Explorer");if(_.BD){_.Ak=false;}_.v=parseInt(v);if(_.Ak){_.Al=_.Am=_.An=_.Ao=false;if(v.indexOf('MSIE 6')>0){_.Ao=true;_.v=6;}}_.Bm=Bi.indexOf("win")>-1;_.mac=Bi.indexOf("mac")>-1;}function AY(At){var _=this,r,d=0,l=[];var p=["\\\\","\\/","\\.","\\+","\\*","\\?","\\$","\\^","\\|"];for(i=0;i<At.length;i++){r=At.substr(i,1);if(_.AU.indexOf(r)!=-1&&r!=''){l[d]=r;_.Ab[d++]=r;}}d=1;var l=l.sort();for(i in p){At=At.replace(eval("/"+p[i]+"/g"),p[i]);}for(i=0;i<l.length;i++){BK=new RegExp(l[i]);At=At.replace(BK,_.A_[l[i]])}return new RegExp("^"+At.replace(/\s+/g,"\\s+")+"$");}function AX(k){var _=this,BZ=_.T(),i,Ae=false;BZ.setMonth(0);for(i in k){if(_.Aa.indexOf(k[i][1])!=-1){var Av=k[i][1];var value=_.AT[k[i][1]][2](k[i][0]);if(Av=='d'){Ae=true;Bk=value;}if(typeof(BZ[_.AT[Av][0]])=='function'){BZ[_.AT[Av][0]](value);if((Av=='m')&&Ae){BZ[_.AT['d'][0]](Bk);}}}}return BZ;}function AV(Ar,At){var _=this,t,e=0,l=[],i=0,BN='',Be='';var Ac=new Date(Ar);do{t=At.substr(i,1);if(_.AU.indexOf(t)!=-1&&t!=''){if(typeof(Ac[_.AT[t][1]])!='function')Be=new String(_.AT[t][1](Ac));else Be=new String(Ac[_.AT[t][1]]());BN+=Be}else BN+=t;i++}while(i<At.length)return BN;}function AZ(As,At){var _=this,m=[],i,d=1;var Bn=_.W(At);var a=Bn.exec(As);if(!a||typeof(a)!='object'){return null;}for(i in _.Ab){if(_.Ab[i]=='A'||_.Ab[i]=='a')_.AW=i;m[i]=[a[d++],_.Ab[i]]}Ai=m.length-1-_.AW;return _.V(m.reverse());}function F(b,As){var Ba=new Date(As),Bg=D(b,Ba),Bh,Bb,Ap;if(Bg&2)Bh='SelectedDay';else if(Bg&8)Bh='OtherMonthDay';else Bh='CurrentMonthDay';Bb='javascript: R(ALTCLS['+b.AE+'],'+As.valueOf()+');';Ap='<a href="'+Bb+'" class="'+b.z[Bh]+'">'+As.getDate()+'</a>';if(Bg&2)Bh='SelectedDay';else if(Bg&4)Bh='HoliDay';else if(Bg&8)Bh='OtherMonthDay';else Bh='WorkDay';Ap='<td class="'+b.z[Bh+'Cell']+'" align="center">'+Ap+'</td>';return Ap;}function Y(){var _=this;_.AU='dmY';_.Aa='dmY';_.A_={'d':"([0-9]{0,2})",'m':"([0-9]{0,2})",'Y':"([0-9]{4})"};_.AT={'d':['setDate',function(j,h){j=j.getDate();if(j<10)return('0'+j);else return j},function(j){return j*1}],'m':['setMonth',function(j){j=j.getMonth()+1;if(j<10)return('0'+j);else return j},function(j){return(j*1-1)}],'Y':['setFullYear','getFullYear',function(j){return j*1}]};_.Ab=[];_.T=C;_.W=AY;_.V=AX;_.U=AV;_.X=AZ;}function L(_){var BV=0,BW=0;if(objaUA.Ak&&objaUA.mac){if(document.body.leftMargin)BV=document.body.leftMargin*1;if(document.body.topMargin)BW=document.body.topMargin*1;}_.AB.style.left=J(_,'Left')+BV+'px';_.AB.style.top=J(_,'Top')+BW+'px';if(objaUA.Ao){_.AC.style.left=_.AB.style.left;_.AC.style.top=_.AB.style.top;}}function J(_,AR){var Ax=0,Bc=_.AO;while(Bc){Ax+=Bc["offset"+AR];Bc=Bc.offsetParent;}return Ax;}function K(_,f){if(document.images&&document.images[f])return document.images[f];else if(_.Af&&document.forms[_.Af].elements[f])return document.forms[_.Af].elements[f];else if(document.all&&document.all[f])return document.all[f];else if(document.getElementById)return document.getElementById(f);else return null;}function Bo(){var _=this;_.q=[];_.Au=function(){var n=arguments.length;for(var i=0;i<n;i++)_.q[_.q.length]=arguments[i];};_.BE=function(){return _.q.join('');};}