
var grouptivity={currentUser:null,server:'apps.grouptivity.com',isRegisteredUser:false,gtvtMsg:'',badObjects:null,attachDIV:function(){var d,b,i,fl,flp,fwm,isFrameAdded=false;d=document;b=document.createElement("div");b.setAttribute("id","g-bookmarkpopup");b.style.position="absolute";b.style.backgroundColor="#ffffff";b.style.display="none";d.getElementsByTagName("body")[0].appendChild(b);},closeGtvtWindow:function(){var popupwin=document.getElementById('g-bookmarkpopup');popupwin.style.display='none';this.badObjectsVisible(true);},processThirdTab:function(){var service="http://"+grouptivity.server+"/socialmail/userInbox?lsize=5&pId="+(typeof gtvt_partner_id==='undefined'?"":encodeURIComponent(gtvt_partner_id));var callback='grouptivity.displayMygrouptivity';grouptivity.jsonp(service,callback);},changeTab:function(tab){var tab1=document.getElementById('g-tab-1');var tab2=document.getElementById('g-tab-2');var tab3=document.getElementById('g-tab-3');var body1=document.getElementById('gtvt-body-1');var body2=document.getElementById('gtvt-body-2');var body3=document.getElementById('gtvt-body-3');switch(tab){case '1':if(body1.style.display==='none'){grouptivity.trackPage("/api/webjs/email");};if(tab2){tab2.className='';};if(tab1){tab1.className='g-mod-tab-active';};if(tab3){tab3.className='';};body2.style.display='none';body1.style.display='block';body3.style.display='none';break;case '2':if(body2.style.display==='none'){grouptivity.trackPage("/api/webjs/bookmark");};if(tab1){tab1.className='';};if(tab2){tab2.className='g-mod-tab-active';};if(tab3){tab3.className='';};body1.style.display='none';body2.style.display='block';body3.style.display='none';break;case '3':if(body3.style.display==='none'){grouptivity.trackPage("/api/webjs/myshares");};if(tab1){tab1.className='';};if(tab2){tab2.className='';};if(tab3){tab3.className='g-mod-tab-active';};body1.style.display='none';body2.style.display='none';body3.style.display='block';grouptivity.processThirdTab();break;}},gtvtCall:function(bmark,url,title,gtvtpId,gtCat){var gfurl="http://"+grouptivity.server+"/socialmail/groups/jsp/sTracker.jsp?pId="+encodeURIComponent(gtvtpId)+"&url="+encodeURIComponent(url)+"&title="+encodeURIComponent(title)+"&sName="+encodeURIComponent(bmark)+"&aCatId="+gtCat;grouptivity.jsonp(gfurl,"");},findPosX:function(obj){var curleft=0;if(obj.offsetParent){while(1){curleft+=obj.offsetLeft;if(!obj.offsetParent){break;};obj=obj.offsetParent;}}else if(obj.x){curleft+=obj.x;};return curleft;},findPosY:function(obj){var curtop=0;if(obj.offsetParent){while(1){curtop+=obj.offsetTop;if(!obj.offsetParent){break;};obj=obj.offsetParent;}}else if(obj.y){curtop+=obj.y;};return curtop;},setPosition:function(objName,x,y){var obj=document.getElementById(objName);if(!obj){var callbackSetPosition=function(){if(grouptivity.adTimeout>5000){return;}else{grouptivity.adTimeout=grouptivity.adTimeout+250;};grouptivity.setPosition(objName,x,y,timeout);};setTimeout(callbackSetPosition,250);return;}else{obj.style.left=(x)+"px";obj.style.top=(y)+"px";}},getWindowWidth:function(){var winW=640;if(parseInt(navigator.appVersion,10)>3){if(navigator.appName=="Netscape"){winW=window.innerWidth;};if(navigator.appName.indexOf("Microsoft")!=-1){winW=document.body.offsetWidth;}};return winW;},getScreenTop:function(){var pY=window.pageYOffset?window.pageYOffset:(document.documentElement&&document.documentElement.scrollTop)?document.documentElement.scrollTop:document.body.scrollTop;return(pY);},sendEmail:function(pId,title,ctg,gurl,subject,description,note,to,from,password,metadata){var service="http://"+grouptivity.server+"/socialmail/emailSend.do";var pArgs="?pId="+encodeURIComponent(pId);pArgs=pArgs+"&jsonp=grouptivity.handleSendResponse";pArgs=pArgs+"&title="+encodeURIComponent(title);pArgs=pArgs+"&ctg="+encodeURIComponent(ctg);pArgs=pArgs+"&url="+encodeURIComponent(gurl);pArgs=pArgs+"&subject="+encodeURIComponent(subject);pArgs=pArgs+"&to="+encodeURIComponent(to);pArgs=pArgs+"&emailNote="+encodeURIComponent(note);pArgs=pArgs+"&apdata="+encodeURIComponent(metadata);if(from!==''){pArgs=pArgs+"&from="+encodeURIComponent(from);};if(password!==''){pArgs=pArgs+"&password="+encodeURIComponent(password);};pArgs=pArgs+"&action=quickComposeSend";var gNotify=document.getElementById("gtvt-notify").checked;var gCheckNotify="N";if(gNotify){gCheckNotify="Y";};pArgs=pArgs+"&ckNotifyForView="+gCheckNotify;pArgs=pArgs+"&description="+encodeURIComponent(description);grouptivity.jsonp(service+pArgs);},handleSendResponse:function(resp){if(this.isArray(resp)&&resp[0].message&&resp[0].type!=='error'){this.showCloseInfo(resp[0].message);}else if(resp[0].type==='error'&&resp[0].message){this.submitMainForm(resp[0].message);}else{this.submitMainForm();}},showCloseInfo:function(msg){var gModDiv=document.getElementById("gtvt-main-form");if(msg==='Your message is being sent.'){this.gtvtMsg='Your message was sent successfully!';}else{this.gtvtMsg=msg;};this.changeTab('3');},submitMainForm:function(msg){var mainForm=document.getElementById("gtvt-main-form");if(typeof msg!=='undefined'){document.getElementById("gtvt_msg").value=msg;};mainForm.submit();},processForm:function(pId,title,ctg,gurl,desc,meta){var subBtn=document.getElementById("gtvt_submit");subBtn.disabled=true;subBtn.value="Sending...";grouptivity.trackPage("/api/webjs/emailSend");var err=0;var errString='';var to=document.getElementById("gtvt_to").value;if(to===''){errString+='To address is empty';err+=1;};var from=document.getElementById("gtvt_from").value;if(from===''&&!grouptivity.currentUser){if(err===1){errString+=' and ';};errString+='Your address is empty.';err=1;};var subject=document.getElementById("gtvtfrm_subject").value;var note=document.getElementById("gtvt_note").value;if(err===0){this.sendEmail(pId,title,ctg,gurl,subject,desc,note,to,from,"",meta);}else{alert(errString);subBtn.disabled=false;subBtn.value="Send It";}},processAutoComplete:function(){this.getContacts();},getContacts:function(){var service="http://"+grouptivity.server+"/socialmail/api/contacts";var callback='grouptivity.handleContactResponse';grouptivity.jsonp(service,callback);},handleContactResponse:function(resp){if(this.isArray(resp)&&resp[resp.length-1].status){if(resp[resp.length-1].status!==''){for(var i=0;i<resp.length-2;i++){this.candidateAddrs[i]=resp[i].email;this.candidateNames[i]=resp[i].name;};this.isRegisteredUser=true;this.currentUser=resp[resp.length-2].currentUser;this.userRecognized(this.currentUser);this.initAutoComplete('gtvt_to','hitBox');}else{this.notUser();return;}}else{this.notUser();return;}},userRecognized:function(name){var tdID=document.getElementById("gtvt-login-register");tdID.innerHTML="Welcome <b>"+this.capitalize(name)+"</b><br/> (<a href='javascript:grouptivity.notUser()' style='text-decoration:underline'>Not Me?</a> | <a href='http://"+grouptivity.server+"/socialmail'>Go to Account</a>)";var lbl=document.getElementById("gtvt-label-from");lbl.style.display="none";var lbl2=document.getElementById("gtvt_from");lbl2.style.display='none';},notUser:function(){var lbl=document.getElementById("gtvt-label-from");lbl.style.display="block";var lbl2=document.getElementById("gtvt_from");lbl2.style.display='block';var tdID=document.getElementById("gtvt-login-register");var tdIDparent=tdID.parentNode;tdIDparent.removeChild(tdID);tdID=document.createElement("td");tdID.id="gtvt-login-register";tdID.className="gtvt-bottom-label";var link=document.createElement("a");link.setAttribute("href","http://"+grouptivity.server+"/socialmail/login.do?pId="+(typeof gtvt_partner_id==='undefined'?"":encodeURIComponent(gtvt_partner_id)));link.setAttribute("target","_blank");var bold=document.createElement("b");bold.appendChild(document.createTextNode("Login"));link.appendChild(bold);tdID.appendChild(link);tdID.appendChild(document.createTextNode(" | "));link=document.createElement("a");link.setAttribute("href","http://"+grouptivity.server+"/socialmail/signup.do?pId="+(typeof gtvt_partner_id==='undefined'?"":encodeURIComponent(gtvt_partner_id)));link.setAttribute("target","_blank");link.appendChild(document.createTextNode("Register"));tdID.appendChild(link);tdIDparent.insertBefore(tdID,tdIDparent.firstChild);this.currentUser=null;},g_maxHits:10,hitBox:null,addrBox:null,g_regainFocus:false,candidateAddrs:[],candidateNames:[],prefDelim:",",KEY_BACKSPACE:8,KEY_TAB:9,KEY_ENTER:13,KEY_ESC:27,KEY_LEFT_ARROW:37,KEY_UP_ARROW:38,KEY_RIGHT_ARROW:39,KEY_DOWN_ARROW:40,timeout:0,cbtTimeout:0,cbtpTimeout:0,adTimeout:0,swfTimeout:0,initAutoComplete:function(fieldName,dropName){this.g_maxHits=10;grouptivity.addrBox=document.getElementById(fieldName);grouptivity.addrBox.onkeydown=this.handleKeyDown;grouptivity.addrBox.onkeypress=this.handleKeyPress;grouptivity.addrBox.onkeyup=this.handleKeyUp;grouptivity.addrBox.onblur=this.handleAddrBoxBlur;grouptivity.hitBox=document.getElementById(dropName);grouptivity.hitBox.style.visibility="hidden";},handleAddrBoxBlur:function(evt){if(grouptivity.g_regainFocus){grouptivity.addrBox.focus();grouptivity.g_regainFocus=false;}else{grouptivity.gtvt_hideHitBox();grouptivity.nixDanglingDelimiter();}},gtvt_handleItemMouseDown:function(evt){grouptivity.g_regainFocus=true;},gtvt_handleItemMouseUp:function(evt){var children=grouptivity.hitBox.childNodes;for(var i=0;i<children.length;++i){if(this==children[i]){grouptivity.hitBox.setAttribute("hilite_idx",i);break;}};grouptivity.commitSelection();grouptivity.gtvt_hideHitBox();},gtvt_handleItemMouseOver:function(evt){if(!grouptivity.hasClass(this,"hilite")){grouptivity.gtvt_replaceClass(this,"plain","mousehilite");}},gtvt_handleItemMouseOut:function(evt){if(grouptivity.hasClass(this,"mousehilite")){grouptivity.gtvt_replaceClass(this,"mousehilite","plain");}},handleKeyDown:function(evt){if(!evt){evt=window.event;};var keyCode=evt.keyCode;switch(keyCode){case grouptivity.KEY_ESC:grouptivity.gtvt_hideHitBox();grouptivity.cancelEvent(evt);return;case grouptivity.KEY_UP_ARROW:case grouptivity.KEY_DOWN_ARROW:case grouptivity.KEY_TAB:case grouptivity.KEY_ENTER:if(grouptivity.gtvt_isHitBoxVisible()){grouptivity.cancelEvent(evt);};return;}},handleKeyPress:function(evt){if(!evt){evt=window.event;};var keyCode=evt.keyCode;switch(keyCode){case grouptivity.KEY_LEFT_ARROW:case grouptivity.KEY_RIGHT_ARROW:grouptivity.gtvt_hideHitBox();return;case grouptivity.KEY_ESC:grouptivity.gtvt_hideHitBox();grouptivity.cancelEvent(evt);return;case grouptivity.KEY_UP_ARROW:case grouptivity.KEY_DOWN_ARROW:case grouptivity.KEY_TAB:case grouptivity.KEY_ENTER:if(grouptivity.gtvt_isHitBoxVisible()){grouptivity.cancelEvent(evt);};return;}},handleKeyUp:function(evt){if(!evt){evt=window.event;};var keyCode=evt.keyCode;switch(keyCode){case grouptivity.KEY_LEFT_ARROW:case grouptivity.KEY_RIGHT_ARROW:grouptivity.gtvt_hideHitBox();return;case grouptivity.KEY_ESC:grouptivity.cancelEvent(evt);return;case grouptivity.KEY_UP_ARROW:grouptivity.gtvt_selectPrevious();return;case grouptivity.KEY_DOWN_ARROW:grouptivity.gtvt_selectNext();return;case grouptivity.KEY_TAB:case grouptivity.KEY_ENTER:if(grouptivity.gtvt_isHitBoxVisible()){grouptivity.commitSelection();grouptivity.gtvt_hideHitBox();grouptivity.cancelEvent(evt);};return;};grouptivity.searchAddressBook(grouptivity.gtvt_getActiveChunk(grouptivity.addrBox));},cancelEvent:function(evt){evt.returnValue=false;if(evt.preventDefault){evt.preventDefault();}},gtvt_getSelectionIdx:function(){return grouptivity.hitBox.getAttribute("hilite_idx");},gtvt_getSelectedItem:function(){return grouptivity.hitBox.childNodes[grouptivity.gtvt_getSelectionIdx()];},commitSelection:function(){var selectedItem=grouptivity.gtvt_getSelectedItem();var selectedEmail=grouptivity.filterEmail(selectedItem.value);var newChunk=selectedEmail+grouptivity.prefDelim+"";grouptivity.gtvt_replaceActiveChunk(grouptivity.addrBox,newChunk);grouptivity.addrBox.focus();grouptivity.addrBox.scrollTop=grouptivity.addrBox.scrollHeight;},filterEmail:function(str){str=str.replace(/[^\s]+\s/g,'');str=str.replace(/^</,'');str=str.replace(/>$/,'');return str;},gtvt_getActiveChunkIdx:function(val){if(!val){return -1;};var commaidx=val.lastIndexOf(",");var semicolonidx=val.lastIndexOf(";");if(-1==commaidx&&-1==semicolonidx){return -1;};if(commaidx>=semicolonidx){grouptivity.prefDelim=",";return commaidx;}else{grouptivity.prefDelim=";";return semicolonidx;}},gtvt_getActiveChunk:function(element){if(!element){return "";};var val=element.value;var activeChunkIdx=grouptivity.gtvt_getActiveChunkIdx(val);if(-1==activeChunkIdx){return grouptivity.trimLeft(val);};var newVal=val.substring(activeChunkIdx+1,val.length);return grouptivity.trimLeft(newVal);},gtvt_replaceActiveChunk:function(element,newChunk){if(!element){return;};var oldVal=element.value;var activeChunkIdx=grouptivity.gtvt_getActiveChunkIdx(oldVal);if(-1==activeChunkIdx){element.value=oldVal.substring(0,activeChunkIdx+1)+newChunk;}else{element.value=oldVal.substring(0,activeChunkIdx+1)+""+newChunk;}},gtvt_selectPrevious:function(){if(!grouptivity.gtvt_isHitBoxVisible()){return;};var curIdx=grouptivity.hitBox.getAttribute("hilite_idx");if(curIdx-1>=0){grouptivity.gtvt_replaceClass(grouptivity.hitBox.childNodes[curIdx],"hilite","plain");grouptivity.gtvt_replaceClass(grouptivity.hitBox.childNodes[curIdx-1],"plain","hilite");grouptivity.hitBox.setAttribute("hilite_idx",curIdx-1);}},gtvt_selectNext:function(){if(!grouptivity.gtvt_isHitBoxVisible()){return;};var curIdx=grouptivity.hitBox.getAttribute("hilite_idx")-0;if(curIdx+1<grouptivity.hitBox.childNodes.length){grouptivity.gtvt_replaceClass(grouptivity.hitBox.childNodes[curIdx],"hilite","plain");grouptivity.gtvt_replaceClass(grouptivity.hitBox.childNodes[curIdx+1],"plain","hilite");grouptivity.hitBox.setAttribute("hilite_idx",curIdx+1);}},hasClass:function(element,className){if(!element){return false;};return element.className.indexOf(className)!=-1;},gtvt_removeClass:function(element,oldClass){if(!element){return;};var idx=element.className.indexOf(oldClass);if(-1===idx){return;};element.className=element.className.substring(0,idx)+element.className.substring(idx+oldClass.length+1);},gtvt_addClass:function(element,newClass){if(element&&-1==element.className.indexOf(newClass)){element.className=element.className+" "+newClass;}},gtvt_replaceClass:function(element,oldClass,newClass){if(!element){return;};grouptivity.gtvt_removeClass(element,oldClass);grouptivity.gtvt_addClass(element,newClass);},Gtvt_hit:function(idx,sortKey,name,decoratedName,addr,decoratedAddr){this.idx=idx;this.sortKey=sortKey.toLowerCase();this.name=name;this.decoratedName=decoratedName;this.addr=addr;this.decoratedAddr=decoratedAddr;},gtvt_sortHits:function(a,b){if(a.sortKey>b.sortKey){return 1;};if(a.sortKey<b.sortKey){return -1;};return 0;},searchAddressBook:function(searchTerm){if(this.isBlank(searchTerm)||!this.candidateNames){grouptivity.gtvt_hideHitBox();return;};var escapeNonAlphaNum=/([^a-zA-Z0-9\s])/gi;var pattern="^"+searchTerm.replace(escapeNonAlphaNum,"\\$1");var re=new RegExp(pattern,"gi");while(grouptivity.hitBox.hasChildNodes()){grouptivity.hitBox.removeChild(grouptivity.hitBox.childNodes[0]);};var hits=[];var numHits=0;var name,addr,decoratedAddr,decoratedName;var len=this.candidateNames.length;for(var i=0;i<len;i++){if(this.candidateNames[i]&&this.candidateNames[i].search(re)!=-1){name=this.candidateNames[i];decoratedName=this.emboldSubstring(this.capitalize(name),searchTerm.length);addr=this.candidateAddrs[i];decoratedAddr=addr;if(addr!==""){if(addr.search(re)!=-1){decoratedAddr=this.emboldSubstring(addr,searchTerm.length);};decoratedAddr="&lt;"+decoratedAddr+"&gt;";addr="<"+addr+">";};hits[hits.length]=new grouptivity.Gtvt_hit(i,name.toLowerCase(),name,decoratedName,addr,decoratedAddr);if(++numHits==this.g_maxHits){break;}}};if(numHits!=this.g_maxHits){len=this.candidateAddrs.length;for(i=0;i<len;i++){SKIP_ITER:if(this.candidateAddrs[i]&&this.candidateAddrs[i].search(re)!=-1){for(var j=0;j<hits.length;j++){if(hits[j].idx==i){break SKIP_ITER;}};addr=this.candidateAddrs[i];decoratedAddr=this.emboldSubstring(addr,searchTerm.length);name=this.candidateNames[i];addr="<"+addr+">";decoratedAddr="&lt;"+decoratedAddr+"&gt;";hits[hits.length]=new grouptivity.Gtvt_hit(i,addr.toLowerCase(),name,name,addr,decoratedAddr);if(++numHits==this.g_maxHits){break;}}}};hits.sort(grouptivity.gtvt_sortHits);var hitBoxWidth=this.gtvt_getHitBoxWidth();len=hits.length;for(i=0;i<len;i++){var item=window.document.createElement("div");var itemWidth=hitBoxWidth-4;item.style.width=itemWidth+"px";if(!this.is_safari){item.onmousedown=grouptivity.gtvt_handleItemMouseDown;item.onmouseup=grouptivity.gtvt_handleItemMouseUp;item.onmouseover=grouptivity.gtvt_handleItemMouseOver;item.onmouseout=grouptivity.gtvt_handleItemMouseOut;if(this.is_win&&!this.is_ie){item.style.cursor='hand';}else{item.style.cursor='pointer';}};var currHit=hits[i];var label="<nobr>"+currHit.decoratedName+" "+currHit.decoratedAddr+"</nobr>";item.innerHTML=label;grouptivity.hitBox.appendChild(item);if(0===i){item.className="hilite";grouptivity.hitBox.setAttribute("hilite_idx",0);}else{item.className="plain";};if(currHit.name!==""&&currHit.addr!==""){item.value=currHit.name+" "+currHit.addr;}else if(""===currHit.name){item.value=currHit.addr;}else{item.value=currHit.name;}};return numHits>0?grouptivity.showHitBox():grouptivity.gtvt_hideHitBox();},emboldSubstring:function(val,splitidx){if(null===val){return "";};var preChunk=val.substring(0,splitidx);var postChunk=val.substring(splitidx,val.length);return "<strong>"+preChunk+"</strong>"+postChunk;},capitalize:function(val){return val;},gtvt_isHitBoxVisible:function(){return "visible"==grouptivity.hitBox.style.visibility;},gtvt_hideHitBox:function(){grouptivity.hitBox.style.visibility="hidden";},showHitBox:function(){if(!(this.is_mac&&this.is_ie)){if("hidden"==grouptivity.hitBox.style.visibility){this.gtvt_updateHitBoxPos();grouptivity.hitBox.style.visibility="visible";}}},gtvt_updateHitBoxPos:function(){var yFix=20;if(this.is_ie){yFix=-50;};var xFix=5;grouptivity.hitBox.style.left=this.gtvt_findPosX(grouptivity.addrBox)+xFix+"px";grouptivity.hitBox.style.top=this.gtvt_findPosY(grouptivity.addrBox)+yFix+this.gtvt_findHeight(grouptivity.addrBox)+"px";},gtvt_getHitBoxWidth:function(){var hitBoxWidth=this.gtvt_findWidth(grouptivity.hitBox);var addrBoxWidth=this.gtvt_findWidth(grouptivity.addrBox);if(addrBoxWidth>hitBoxWidth){hitBoxWidth=addrBoxWidth;};return hitBoxWidth;},gtvt_findPosX:function(obj){var curLeft=obj.offsetLeft;if(obj.offsetParent){if(this.is_ie){obj=obj.offsetParent;curLeft+=obj.offsetLeft;}}else if(obj.x){curLeft+=obj.x;};return curLeft;},gtvt_findPosY:function(obj){var curTop;if(!this.is_opera){curTop=obj.offsetTop;};if(obj.offsetParent){if(this.is_ie){obj=obj.offsetParent;curTop+=obj.offsetTop;}}else if(obj.y){curTop+=obj.y;};return curTop;},gtvt_findHeight:function(obj){if(obj.offsetHeight){return obj.offsetHeight;}else if(obj.height){return obj.height;}},gtvt_findWidth:function(obj){if(obj.offsetWidth){return obj.offsetWidth;}else if(obj.width){return obj.width;}},nixDanglingDelimiter:function(){grouptivity.addrBox.value=grouptivity.addrBox.value.replace(/[,;]+$/,'');},trimLeft:function(val){return val.replace(/^\s+/,'');},isBlank:function(val){var x=val.replace(/\s+/g,'');if(x===''){return true;}else{return false;}},jsonp:function(url,callback){if(callback){if(url.indexOf("?")>-1){url+="&jsonp=";}else{url+="?jsonp=";}};if(grouptivity.is_ie&&url.length>2000){url=url.substring(0,2000);};if(callback){url+=callback+"&";}else{url+="&";};url+=new Date().getTime().toString();var script=document.createElement("script");script.setAttribute("src",url);script.setAttribute("type","text/javascript");script.setAttribute("charset","utf-8");document.body.appendChild(script);},isArray:function(value){return value&&typeof value==='object'&&typeof value.length==='number'&&typeof value.splice==='function'&&!value.propertyIsEnumerable('length');},pageTracker:null,addTrackingCode:function(){if(typeof _gat==='undefined'){var gaJsHost=(("https:"==document.location.protocol)?"https://ssl.":"http://www.");var s=document.createElement("script");s.src=gaJsHost+"google-analytics.com/ga.js";s.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(s);};grouptivity.setTrackingID();},setTrackingID:function(){if(typeof _gat==='undefined'){var callbackTracker=function(){if(grouptivity.cbtTimeout>5000){return;}else{grouptivity.cbtTimeout=grouptivity.cbtTimeout+500;};grouptivity.setTrackingID();};setTimeout(callbackTracker,500);return;}else{grouptivity.pageTracker=_gat._getTracker("UA-3163214-1");grouptivity.pageTracker._setDomainName("none");grouptivity.pageTracker._setAllowLinker(true);grouptivity.pageTracker._initData();grouptivity.cbtTimeout=0;}},trackPage:function(pg){if(pg&&grouptivity.pageTracker){grouptivity.pageTracker._setDomainName("none");grouptivity.pageTracker._initData();grouptivity.pageTracker._trackPageview(pg);grouptivity.cbtpTimeout=0;}else if(pg&&!grouptivity.pageTracker){var callbackTrackPage=function(){if(grouptivity.cbtpTimeout>5000){return;}else{grouptivity.cbtpTimeout=grouptivity.cbtpTimeout+500;};grouptivity.trackPage(pg);};setTimeout(callbackTrackPage,500);return;}},friendFeed:function(){window.open("http://grouptivity.com/main/api/webjs/php/ff.php?t="+encodeURIComponent(document.forms["gtvt-main-form"].title.value)+"&u="+encodeURIComponent(document.forms["gtvt-main-form"].url.value)+"&d="+encodeURIComponent(document.forms["gtvt-main-form"].description.value));return false;},createTracker:function(bmark,url,title,gtvtpId,gtCat,service){var cs_bmark=bmark;var cs_url=url;var cs_title=title;var cs_gtvtpId=gtvtpId;var cs_gtCat=gtCat;var csure;if(service==='FriendFeed'){csure=function(){grouptivity.gtvtCall(cs_bmark,cs_url,cs_title,cs_gtvtpId,cs_gtCat);grouptivity.friendFeed();return false;};}else{csure=function(){grouptivity.gtvtCall(cs_bmark,cs_url,cs_title,cs_gtvtpId,cs_gtCat);};};return csure;},loadSWF:function(){if(typeof grouptivity.SWFloading==='undefined'){grouptivity.SWFloading="Loading...";var s=document.createElement("script");s.src="http://cdn.grouptivity.com/main/api/webjs/js/swfobject.js";s.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(s);}},swapSWF:function(obj,type){var flId,flSrc,flW,flH,flpa,flpaStr,flDate,flVars={},flParams={wmode:"transparent"},flAtts={},i,tempStr="",tempDiv,attrs;if(typeof swfobject==="undefined"){var callbackSwapSWF=function(){if(grouptivity.swfTimeout>5000){return;}else{grouptivity.swfTimeout=grouptivity.swfTimeout+100;};grouptivity.swapSWF(obj,type);};setTimeout(callbackSwapSWF,100);return;};if(type==="embed"){flDate=new Date();flId=obj.id&&document.getElementsByName(obj.id).length===1?obj.id:'gtvt-fl-'+flDate.getTime();flSrc=obj.src?obj.src:"";flW=obj.width?obj.width:"0";if(flW==="0"&&obj.style&&obj.style.width&&obj.style.width!=="0"){flW=obj.style.width;};flH=obj.height?obj.height:"0";if(flH==="0"&&obj.style&&obj.style.height&&obj.style.height!=="0"){flH=obj.style.height;};attrs=["play","loop","menu","quality","scale","salign","bgcolor","base","swliveconnect","flashvars","devicefont","allowscriptaccess","seamlesstabbing","allowfullscreen","allownetworking","style","name"];tempStr='wmode:"transparent"';for(i=0;i<attrs.length;i++){if(obj.getAttribute(attrs[i])){tempStr=tempStr+","+attrs[i]+':"'+obj.getAttribute(attrs[i])+'"';}};tempStr='({'+tempStr+'})';flParams=eval(tempStr);tempDiv=document.createElement("div");tempDiv.id=flId;obj.parentNode.replaceChild(tempDiv,obj);swfobject.embedSWF(flSrc,flId,flW,flH,"6.0.65","http://cdn.grouptivity.com/main/api/webjs/expressInstall.swf",flVars,flParams,flAtts);}else{flDate=new Date();flId=obj.id&&document.getElementsByName(obj.id).length===1?obj.id:'gtvt-fl-'+flDate.getTime();flSrc=obj.data?obj.data:"";flW=obj.width?obj.width:"0";flH=obj.height?obj.height:"0";flpaStr='wmode:"transparent"';flpa=obj.getElementsByTagName("param");for(i=0;i<flpa.length;i++){if(flpa[i]&&flpa[i].name&&flpa[i].value&&flpa[i].name.toLowerCase()!=='wmode'){if(flpa[i].name.toLowerCase()==="movie"&&flSrc===""){flSrc=flpa[i].value;};flpaStr=flpaStr+','+flpa[i].name+':"'+flpa[i].value+'"';}};flpaStr='({'+flpaStr+'})';flParams=eval(flpaStr);tempDiv=document.createElement("div");tempDiv.id=flId;obj.parentNode.replaceChild(tempDiv,obj);swfobject.embedSWF(flSrc,flId,flW,flH,"6.0.65","http://cdn.grouptivity.com/main/api/webjs/expressInstall.swf",flVars,flParams,flAtts);}},displayMygrouptivity:function(resp){var inboxDiv=document.getElementById("mygtvt_div");while(inboxDiv.hasChildNodes()){inboxDiv.removeChild(inboxDiv.childNodes[0]);};var tbl=document.createElement("table");tbl.cellPadding="0";tbl.cellSpacing="0";tbl.width="100%";var tbody=tbl.appendChild(document.createElement("tbody"));tbody.id="gtvt_tbody";var instructions;if(typeof resp==='undefined'||!grouptivity.isArray(resp.myUpdates)||resp.myUpdates.length===0){instructions=document.createElement("div");instructions.className="normal_text";instructions.style.border="1px solid #AAAAAA";instructions.style.margin="5px";instructions.style.padding="3px";instructions.appendChild(document.createTextNode("Your shared articles will appear here."));instructions.appendChild(document.createElement("br"));instructions.appendChild(document.createElement("br"));inboxDiv.appendChild(instructions);inboxDiv.appendChild(tbl);grouptivity.printMostShared();return false;};var myUpdates=resp.myUpdates;var tr=tbody.appendChild(document.createElement("tr"));var td=tr.appendChild(document.createElement("td"));td.className="gtvt-bottom-label";if(this.gtvtMsg!==''){var msgDiv=document.createElement("div");msgDiv.className="gtvt-confirm";msgDiv.innerHTML=this.gtvtMsg+"<br/>";td.appendChild(msgDiv);};instructions=document.createElement("div");instructions.appendChild(document.createTextNode("Your recently shared and received articles."));td.appendChild(instructions);tr=tbody.appendChild(document.createElement("tr"));td=tr.appendChild(document.createElement("td"));td.style.padding="5px";td.style.textAlign="left";var ul=document.createElement("ul");ul.className="net-update-list";var li,upd,storyA,dateDiv,closeDiv;for(var i=0;i<myUpdates.length;i++){upd=myUpdates[i];td.appendChild(ul);li=document.createElement("li");li.id="myfeed"+i;var hasWith=false;var hasUrl=true;var hasSvc=false;var svcName;switch(upd.typeind){case "sharing":li.className="ico-mailf";li.title="Shared article";hasWith=true;break;case "reading":li.className="ico-received";li.title="Received article";break;case "grouptivity":li.className="ico-bookmark";hasSvc=true;svcName="Grouptivity";li.title="Bookmarked on Grouptivity";break;case "google":li.className="ico-google";hasSvc=true;svcName="Google";li.title="Bookmarked on Google";break;case "googlebookmarks":li.className="ico-google";hasSvc=true;svcName="Google";li.title="Bookmarked on Google";break;case "facebook":li.className="ico-fb";hasSvc=true;svcName="Facebook";li.title="Bookmarked on facebook";break;case "fark":li.className="ico-fark";hasSvc=true;svcName="Fark";li.title="Bookmarked on fark";break;case "friendfeed":li.className="ico-ff";hasSvc=true;svcName="FriendFeed";li.title="Posted to friendfeed";break;case "windows":li.className="ico-windows";hasSvc=true;svcName="Windows Live";li.title="Bookmarked on Windows";break;case "windowslive":li.className="ico-windows";hasSvc=true;svcName="Windows Live";li.title="Bookmarked on Live";break;case "delicious":li.className="ico-del";hasSvc=true;svcName="Delicious";li.title="Posted to delicious";break;case "digg":li.className="ico-digg";hasSvc=true;svcName="Digg";li.title="Posted to digg";break;case "yahoo":li.className="ico-yahoo";hasSvc=true;svcName="Yahoo!";li.title="Bookmarked on Yahoo";break;case "yahoobm":li.className="ico-yahoo";hasSvc=true;svcName="Yahoo! Bookmarks";li.title="Bookmarked on Yahoo";break;case "yahooweb":li.className="ico-yahoo";hasSvc=true;svcName="Yahoo! Web";li.title="Posted to Yahoo web";break;case "ask":li.className="ico-ask";hasSvc=true;svcName="Ask";li.title="Bookmarked on Ask";break;case "furl":li.className="ico-furl";hasSvc=true;svcName="Furl";li.title="Posted to furl";break;case "stumbleupon":li.className="ico-stumbleupon";hasSvc=true;svcName="StumbleUpon";li.title="Posted to StumbleUpon";break;case "reddit":li.className="ico-reddit";hasSvc=true;svcName="Reddit";li.title="Bookmarked on Reddit";break;case "slashdot":li.className="ico-slashdot";hasSvc=true;svcName="Slashdot";li.title="Posted to Slashdot";break;case "technocrati":li.className="ico-technorati";hasSvc=true;svcName="Technorati";li.title="Posted to Technocrati";break;case "twitter":li.className="ico-twitter";hasSvc=true;svcName="Twitter";li.title="Posted to Twitter";break;case "blinklist":li.className="ico-blink";hasSvc=true;svcName="Blinklist";li.title="Posted to blinklist";break;case "blogmarks":li.className="ico-blogmarks";hasSvc=true;svcName="Blogmarks";li.title="Posted to Blogmarks";break;case "newsvine":li.className="ico-newsvine";hasSvc=true;svcName="Newsvine";li.title="Posted to newsvine";break;case "magnolia":li.className="ico-magnolia";hasSvc=true;svcName="Magnolia";li.title="Posted to Magnolia";break;case "misterwong":li.className="ico-mrwong";hasSvc=true;svcName="Mister Wong";li.title="Posted to Mister Wong";break;case "myspace":li.className="ico-myspace";hasSvc=true;svcName="MySpace";li.title="Posted to MySpace";break;case "tailrank":li.className="ico-tailrank";hasSvc=true;svcName="Tailrank";li.title="Posted to Tailrank";break;default:li.className="ico-star";};li.appendChild(document.createTextNode(' '));var a=document.createElement("a");a.href=upd.url;a.target="_blank";a.appendChild(document.createTextNode(upd.title));li.appendChild(a);ul.appendChild(li);};inboxDiv.appendChild(tbl);tr=tbody.appendChild(document.createElement("tr"));td=tr.appendChild(document.createElement("td"));td.className="gtvt-bottom-label";td.align="right";var strong=document.createElement("strong");a=document.createElement("a");a.href="http://"+grouptivity.server+"/socialmail";a.target="_blank";strong.appendChild(document.createTextNode("More >"));a.appendChild(strong);td.appendChild(a);grouptivity.printMostShared();tr=tbody.appendChild(document.createElement("tr"));td=tr.appendChild(document.createElement("td"));msgDiv=document.createElement("div");msgDiv.id="gtvt_msg";td.appendChild(msgDiv);var fbUrl='http://apps.facebook.com/grouptivity/?publId='+(typeof gtvt_partner_id==='undefined'?'':encodeURIComponent(gtvt_partner_id));var fbAppHtml='';var sharePlusHtml='';var showGreeting=false;var greetingMsg='';if(gtvt_hide_fbapp!=1){showGreeting=true;fbAppHtml="<br/><div id='gtvt-fbapp'><a target='_blank' href='"+fbUrl+"'><img src='http://cdn.grouptivity.com/main/api/webjs/images/fbapp.gif' border='0' height='47' width='307'/></a></div>";}else{fbAppHtml="";};msgDiv.innerHTML=fbAppHtml;},printMostShared:function(){var tbody=document.getElementById("gtvt_tbody");var tr=tbody.appendChild(document.createElement("tr"));var td=tr.appendChild(document.createElement("td"));td.className="gtvt-bottom-label";var msinstructions=document.createElement("div");var labeltext="Most shared articles from "+(typeof gtvt_partner_id==='undefined'?"Grouptivity network:":"this publisher:");var strong=document.createElement("strong");strong.appendChild(document.createTextNode(labeltext));msinstructions.appendChild(strong);td.appendChild(msinstructions);tr=tbody.appendChild(document.createElement("tr"));td=tr.appendChild(document.createElement("td"));var mostshared=document.createElement("div");mostshared.id="gtvtMostShared";td.appendChild(mostshared);var mostSharedUrl="http://"+grouptivity.server+"/socialmail/groups/jsp/widgetMostShared.jsp?lsize=5&pId="+(typeof gtvt_partner_id==='undefined'?"":encodeURIComponent(gtvt_partner_id))+"&day=5&type=shared&start=0";var mostSharedCallback='grouptivity.processMostShared';grouptivity.jsonp(mostSharedUrl,mostSharedCallback);tr=tbody.appendChild(document.createElement("tr"));td=tr.appendChild(document.createElement("td"));td.className="gtvt-bottom-label";td.align="right";var a=document.createElement("a");a.className="grouptivity-newsItemA";a.target="_blank";a.href="http://www.grouptivity.com/sharerank?pId="+(typeof gtvt_partner_id==='undefined'?"":encodeURIComponent(gtvt_partner_id));var str=document.createElement("strong");str.appendChild(document.createTextNode("More News >"));a.appendChild(str);td.appendChild(a);},processMostShared:function(data){var ul,li,a,i;var mostSharedDiv=document.getElementById("gtvtMostShared");while(mostSharedDiv.hasChildNodes()){mostSharedDiv.removeChild(mostSharedDiv.childNodes[0]);};if(typeof data==='undefined'||!grouptivity.isArray(data.mostShared)||data.mostShared.length===0){var instructions=document.createElement("div");instructions.className="normal_text";instructions.style.border="1px solid #AAAAAA";instructions.style.margin="5px";instructions.style.padding="3px";instructions.appendChild(document.createTextNode("Most shared articles will appear here."));instructions.appendChild(document.createElement("br"));instructions.appendChild(document.createElement("br"));mostSharedDiv.appendChild(instructions);return false;};ul=document.createElement("ul");ul.className="net-update-list";for(i=0;i<data.mostShared.length;i++){li=document.createElement("li");li.className="grouptivity-newsItem";a=document.createElement("a");a.className="grouptivity-newsItemA";a.target="_blank";a.href=data.mostShared[i].url;a.appendChild(document.createTextNode(data.mostShared[i].title));li.appendChild(a);ul.appendChild(li);};mostSharedDiv.appendChild(ul);},hideBadObjects:function(x,y,w,h){if(!this.badObjects){this.badObjects=[];var fl=document.getElementsByTagName("object");for(i=0;i<fl.length;i++){if(this.is_ie||fl[i].type==='application/x-shockwave-flash'||fl[i].classid==="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"){fwm="";flp=fl[i].getElementsByTagName("param");for(var j=0;j<flp.length;j++){if(flp[j].name&&flp[j].name.toLowerCase()==="wmode"){if(flp[j].value){fwm=flp[j].value;}}};if(fwm!=="transparent"&&this.doRectanglesOverlap(x,y,w,h,grouptivity.findPosX(fl[i]),grouptivity.findPosY(fl[i]),fl[i].offsetWidth,fl[i].offsetHeight)){this.badObjects.push(fl[i]);}}};fl=document.getElementsByTagName("embed");for(i=0;i<fl.length;i++){if((this.is_ie||fl[i].type==='application/x-shockwave-flash')&&((!fl[i].wmode)||fl[i].wmode!=="transparent")){if(this.doRectanglesOverlap(x,y,w,h,grouptivity.findPosX(fl[i]),grouptivity.findPosY(fl[i]),fl[i].offsetWidth,fl[i].offsetHeight)){this.badObjects.push(fl[i]);}}};if(typeof gtvt_iframe_ignore==="undefined"||gtvt_iframe_ignore!==1){fl=document.getElementsByTagName("iframe");for(i=0;i<fl.length;i++){if(this.doRectanglesOverlap(x,y,w,h,grouptivity.findPosX(fl[i]),grouptivity.findPosY(fl[i]),fl[i].offsetWidth,fl[i].offsetHeight)){this.badObjects.push(fl[i]);}}}};this.badObjectsVisible(false);},badObjectsVisible:function(bool){if(!this.badObjects){return;};for(var i=0;i<this.badObjects.length;i++){this.badObjects[i].style.visibility=bool?"visible":"hidden";}},doRectanglesOverlap:function(aX,aY,aW,aH,bX,bY,bW,bH){return(aX+aW-1>=bX&&bX+bW-1>=aX&&aY+aH-1>=bY&&bY+bH-1>=aY);}};grouptivity.agt=navigator.userAgent.toLowerCase();grouptivity.appVer=navigator.appVersion.toLowerCase();grouptivity.is_opera=(grouptivity.agt.indexOf("opera")!=-1);grouptivity.iePos=grouptivity.appVer.indexOf('msie');grouptivity.kqPos=grouptivity.agt.indexOf('konqueror');grouptivity.is_konq=grouptivity.kqPos!==-1?true:false;grouptivity.is_safari=((grouptivity.agt.indexOf('safari')!=-1)&&(grouptivity.agt.indexOf('mac')!=-1))?true:false;grouptivity.is_khtml=(grouptivity.is_safari||grouptivity.is_konq);grouptivity.is_ie=((grouptivity.iePos!=-1)&&(!grouptivity.is_opera)&&(!grouptivity.is_khtml));grouptivity.is_win=((grouptivity.agt.indexOf("win")!=-1)||(grouptivity.agt.indexOf("16bit")!=-1));grouptivity.is_mac=(grouptivity.agt.indexOf("mac")!=-1);if(window.addEventListener){window.addEventListener("load",grouptivity.attachDIV,false);}else if(window.attachEvent){window.attachEvent("onload",grouptivity.attachDIV);};function gtvtShowPopUp(btnObj,gvTitle,gvURL,gvCategory,gvDescription,gvMeta){grouptivity.addTrackingCode();var gtvtPartnerId='';if(typeof(gtvt_partner_id)!=='undefined'){gtvtPartnerId=gtvt_partner_id;}else{gtvt_hide_fbapp=1;};var gtvtpId=gtvtPartnerId;var gtvtUrl=document.location.href;var gtvtTitle=document.title;var gtvtCategory="All";var gtvtDescription="";var gtvtMeta="";if(typeof(gtvt_hide_fbapp)==='undefined'){gtvt_hide_fbapp=0;};if(typeof(gtvt_hide_clip)==='undefined'){gtvt_hide_clip=0;};if(typeof(gtvt_hide_social)==='undefined'){gtvt_hide_social=0;};if(typeof(gtvt_hide_email)==='undefined'){gtvt_hide_email=0;};if(typeof(gtvt_email_note)==='undefined'){gtvt_email_note="Check this out...";};if(typeof(gtvt_subject_prefix)==='undefined'){gtvt_subject_prefix="Let\'s discuss ";};if(typeof(gtvt_hide_mygtvt)==='undefined'){gtvt_hide_mygtvt=0;};var gModBoxStyle1="";var gModBoxStyle2="";if(typeof(gtvt_border_color)!='undefined'){gModBoxStyle1+='border:1px solid '+gtvt_border_color+';';gModBoxStyle2+='border-left:1px solid '+gtvt_border_color+';';gModBoxStyle2+='border-right:1px solid '+gtvt_border_color+';';};var gModBoxStyle3=gModBoxStyle1;var gModBoxStyle="";if(typeof(gtvt_shadow_color)!='undefined'){gModBoxStyle+='border:4px solid '+gtvt_shadow_color;};if(typeof(gtvt_banner_color)!='undefined'){gModBoxStyle1+='background-color:'+gtvt_banner_color+';';};if(typeof(gtvt_from)==='undefined'){gtvt_from="";};if(typeof(gvTitle)!=='undefined'){gtvtTitle=gvTitle;};if(typeof(gvURL)!=='undefined'){gtvtUrl=gvURL;};if(typeof(gvCategory)!=='undefined'){gtvtCategory=gvCategory;};if(typeof(gvDescription)!=='undefined'){gtvtDescription=gvDescription;};if(typeof(gvMeta)!=='undefined'){gtvtMeta=gvMeta;};if(typeof(gtvt_allow_cats)==='undefined'){gtvt_allow_cats=0;};if(gtvt_allow_cats!=1){gtvtCategory="All";};if(document.location.href!=gtvtUrl){gtvt_hide_clip=1;};if(typeof(btnObj)!=='undefined'){if(!document.getElementById("g-bookmarkpopup")){grouptivity.attachDIV();};var gtvtx=grouptivity.findPosX(btnObj);var gtvty=grouptivity.findPosY(btnObj);if((grouptivity.getWindowWidth()-gtvtx)<350){gtvtx=grouptivity.getWindowWidth()-370;};grouptivity.setPosition("g-bookmarkpopup",gtvtx,gtvty+30);}else{grouptivity.attachDIV();var sy=grouptivity.getScreenTop();grouptivity.setPosition("g-bookmarkpopup",100,sy+35);};if(gtvtx){grouptivity.hideBadObjects(gtvtx,gtvty+30,350,500);}else{grouptivity.hideBadObjects(100,sy+35,350,500);};var maindiv,maintable,table,tableBody,tableBody2,tableRow,tableTH,tableTD,tableTD2,div,div2,div3,text,list,listItem,link,form,input,textarea,check,image,bold,socTbl,socTbody,socTr,socTd,gtvtFrame;maindiv=document.createElement("div");maindiv.setAttribute("id","g-mod-div");maindiv.setAttribute("align","left");maindiv.style.cssFloat="left";maindiv.style.zIndex=2147483640;maindiv.style.width="350px";maintable=document.createElement("table");maintable.cellPadding="0";maintable.cellSpacing="0";maintable.width="350px";maintable.bgcolor="#ffffff";maintable.className="g-mod-box";maintable.setAttribute("style",gModBoxStyle);maindiv.appendChild(maintable);tableBody=document.createElement("tbody");maintable.appendChild(tableBody);tableRow=document.createElement("tr");tableBody.appendChild(tableRow);tableTH=document.createElement("th");tableTH.className="g-mod-box-th";tableTH.setAttribute("style",gModBoxStyle1);tableRow.appendChild(tableTH);div=document.createElement("div");div.className="g-mod-left";tableTH.appendChild(div);text=document.createTextNode("Share this Article");div.appendChild(text);list=document.createElement("ul");list.className="g-mod-toolbar";list.onclick=function(){grouptivity.closeGtvtWindow();};tableTH.appendChild(list);listItem=document.createElement("li");listItem.className="g-mod-t-ico";list.appendChild(listItem);div=document.createElement("div");div.className="g-mod-ico-close";listItem.appendChild(div);tableRow=document.createElement("tr");tableBody.appendChild(tableRow);tableTD=document.createElement("td");tableTD.className="g-mod-box-td g-mod-nopadding";tableTD.setAttribute("style",gModBoxStyle2);tableRow.appendChild(tableTD);list=document.createElement("ul");list.className="g-mod-tab-bar";tableTD.appendChild(list);if(gtvt_hide_email!==1){listItem=document.createElement("li");listItem.id="g-tab-1";listItem.className="g-mod-tab-active";listItem.onclick=function(){grouptivity.changeTab('1');};list.appendChild(listItem);link=document.createElement("a");listItem.appendChild(link);text=document.createTextNode("Email Article");link.appendChild(text);}else{gtvt_hide_social=0;};if(gtvt_hide_social!==1){listItem=document.createElement("li");listItem.id="g-tab-2";if(gtvt_hide_email===1){listItem.className="g-mod-tab-active";};listItem.onclick=function(){grouptivity.changeTab('2');};list.appendChild(listItem);link=document.createElement("a");listItem.appendChild(link);text=document.createTextNode("Bookmark & Share");link.appendChild(text);};if(gtvt_hide_mygtvt!==1){listItem=document.createElement("li");listItem.id="g-tab-3";listItem.onclick=function(){grouptivity.changeTab('3');};list.appendChild(listItem);link=document.createElement("a");listItem.appendChild(link);text=document.createTextNode("My Share+");link.appendChild(text);};tableRow=document.createElement("tr");tableBody.appendChild(tableRow);tableTD=document.createElement("td");tableTD.className="g-mod-box-td g-mod-text";tableTD.setAttribute("style",gModBoxStyle3);tableTD.style.backgroundColor="#ffffff";tableTD.style.borderTop="0px";tableRow.appendChild(tableTD);div=document.createElement("div");div.setAttribute("id","gtvt-body-1");div.setAttribute("align","left");if(gtvt_hide_email===1){div.style.display="none";}else{if(grouptivity.pageTracker){grouptivity.trackPage("/api/webjs/email");}};tableTD.appendChild(div);div2=document.createElement("div");div2.className="gtvt-email";div2.setAttribute("align","left");div.appendChild(div2);form=document.createElement("form");form.action="http://"+grouptivity.server+"/socialmail/emailplus.do";form.method="get";form.id="gtvt-main-form";form.acceptCharset="utf-8";form.setAttribute("autocomplete","off");div2.appendChild(form);div=document.createElement("div");div.className="gtvt-label";text=document.createTextNode("To Address:");div.appendChild(text);form.appendChild(div);input=document.createElement("input");input.id="gtvt_to";input.type="text";input.name="to";input.value="";input.className="gtvt-text";input.autocomplete="off";form.appendChild(input);div2=document.createElement("div");div2.id="hitBox";form.appendChild(div2);div=document.createElement("div");div.className="gtvt-note";text=document.createTextNode("Separate multiple email addresses using a comma");div.appendChild(text);form.appendChild(div);div=document.createElement("div");div.className="gtvt-space";form.appendChild(div);div=document.createElement("div");div.id="gtvt-label-from";div.className="gtvt-label";div.style.display="none";form.appendChild(div);text=document.createTextNode("Your Address:");div.appendChild(text);input=document.createElement("input");input.id="gtvt_from";input.type="text";input.name="from";input.value=gtvt_from;input.className="gtvt-text";input.style.display="none";form.appendChild(input);div=document.createElement("div");div.className="gtvt-space";form.appendChild(div);div=document.createElement("div");div.className="gtvt-label";text=document.createTextNode("Subject:");div.appendChild(text);form.appendChild(div);input=document.createElement("input");input.id="gtvtfrm_subject";input.name="subject";input.type="text";input.className="gtvt-text";input.value=gtvt_subject_prefix+gtvtTitle;form.appendChild(input);div=document.createElement("div");div.className="gtvt-space";form.appendChild(div);div=document.createElement("div");div.className="gtvt-label";form.appendChild(div);text=document.createTextNode("Message:");div.appendChild(text);textarea=document.createElement("textarea");textarea.id="gtvt_note";textarea.name="emailNote";textarea.className="gtvt-textarea";form.appendChild(textarea);text=document.createTextNode(gtvt_email_note);textarea.appendChild(text);div=document.createElement("div");div.className="gtvt-space";form.appendChild(div);input=document.createElement("input");input.type="button";input.id="gtvt_submit";input.name="gtvt_submit";input.className="gtvt-submit";input.value="Send It";input.onclick=function(){grouptivity.processForm(gtvtpId,gtvtTitle,gtvtCategory,gtvtUrl,gtvtDescription,gtvtMeta);};form.appendChild(input);check=document.createElement("input");check.setAttribute("type","checkbox");check.setAttribute("id","gtvt-notify");form.appendChild(check);text=document.createTextNode("Notify me when message is read.");form.appendChild(text);input=document.createElement("input");input.type="hidden";input.id="gtvt_msg";input.name="gtvt_msg";input.setAttribute("value","");form.appendChild(input);input=document.createElement("input");input.setAttribute("type","hidden");input.setAttribute("name","gtvt_action");input.setAttribute("value","send_mail");form.appendChild(input);input=document.createElement("input");input.setAttribute("type","hidden");input.setAttribute("id","gtvt_post_id");input.setAttribute("name","gtvt_post_id");input.setAttribute("value","");form.appendChild(input);input=document.createElement("input");input.setAttribute("type","hidden");input.setAttribute("id","gtvt_pid");input.setAttribute("name","pId");input.setAttribute("value",gtvtpId);form.appendChild(input);input=document.createElement("input");input.setAttribute("type","hidden");input.setAttribute("id","gtvtfrm_title");input.setAttribute("name","title");input.setAttribute("value",gtvtTitle);form.appendChild(input);input=document.createElement("input");input.setAttribute("type","hidden");input.setAttribute("name","ctg");input.setAttribute("value",gtvtCategory);form.appendChild(input);input=document.createElement("input");input.setAttribute("type","hidden");input.setAttribute("id","gtvtfrm_url");input.setAttribute("name","url");input.setAttribute("value",gtvtUrl);form.appendChild(input);input=document.createElement("input");input.setAttribute("type","hidden");input.setAttribute("name","description");input.setAttribute("value",gtvtDescription);form.appendChild(input);input=document.createElement("input");input.setAttribute("type","hidden");input.setAttribute("id","gtvtfrm_meta");input.setAttribute("name","apdata");input.setAttribute("value",gtvtMeta);form.appendChild(input);div=document.createElement("div");div.setAttribute("id","gtvt-body-2");div.setAttribute("align","left");if(gtvt_hide_email!==1){div.style.display="none";}else{if(grouptivity.pageTracker){grouptivity.trackPage('/api/webjs/bookmark');}};tableTD.appendChild(div);div2=document.createElement("div");div2.className="gtvt-social";div2.setAttribute("align","left");div.appendChild(div2);text=document.createTextNode("Tag this article on your favorite social media sites.");div2.appendChild(text);socTbl=document.createElement("table");socTbl.cellSpacing="0";socTbl.cellPadding="0";socTbl.border="0";socTbody=document.createElement("tbody");socTr=document.createElement("tr");socTd=document.createElement("td");list=document.createElement("ul");socTd.appendChild(list);socTr.appendChild(socTd);socTbody.appendChild(socTr);socTbl.appendChild(socTbody);div2.appendChild(socTbl);var services=["grouptivity","facebook","myspace","digg","delicious","google","windows","yahoo","stumbleupon","reddit","technorati","ask","furl","blinklist","friendfeed","twitter"];if(typeof(gtvt_services)!=='undefined'){if(gtvt_services.indexOf('grouptivity')<0){gtvt_services='grouptivity|'+gtvt_services;};services=gtvt_services.split("|");};var smList=[];var smName=[];var smTrck=[];smName.grouptivity='Save';smTrck.grouptivity='Grouptivity';smList.grouptivity='http://'+grouptivity.server+'/socialmail/saveplus.do?url='+encodeURIComponent(gtvtUrl)+'&title='+encodeURIComponent(gtvtTitle)+'&pId='+encodeURIComponent(gtvtpId)+'&ctg='+encodeURIComponent(gtvtCategory);smName.google='Google Bookmarks';smTrck.google='GoogleBookmarks';smList.google='http://www.google.com/bookmarks/mark?op=edit&bkmk=url='+encodeURIComponent(gtvtUrl)+'&title='+encodeURIComponent(gtvtTitle);smName.facebook='Facebook';smTrck.facebook='FaceBook';smList.facebook='http://www.facebook.com/share.php?u='+encodeURIComponent(gtvtUrl)+'&t='+encodeURIComponent(gtvtTitle);smName.windows='Windows Live';smTrck.windows='WindowsLive';smList.windows='https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-usurl='+encodeURIComponent(gtvtUrl)+'&title='+encodeURIComponent(gtvtTitle)+'&top=1';smName.delicious='Delicious';smTrck.delicious='Delicious';smList.delicious='http://del.icio.us/post?url='+encodeURIComponent(gtvtUrl)+'&title='+encodeURIComponent(gtvtTitle);smName.digg='Digg';smTrck.digg='Digg';smList.digg='http://digg.com/submit?phase=2&url='+encodeURIComponent(gtvtUrl)+'&title='+encodeURIComponent(gtvtTitle);smName.yahoo='Yahoo! My Web';smTrck.yahoo='YahooWeb';smList.yahoo='http://myweb2.search.yahoo.com/myresults/bookmarklet?u='+encodeURIComponent(gtvtUrl)+'&t='+encodeURIComponent(gtvtTitle);smName.ask='Ask';smTrck.ask='Ask';smList.ask='http://myjeeves.ask.com/mysearch/BookmarkIt?v=1.2&t=webpages&url='+encodeURIComponent(gtvtUrl)+'&title='+encodeURIComponent(gtvtTitle);smName.furl='Furl';smTrck.furl='Furl';smList.furl='http://furl.net/storeIt.jsp?u='+encodeURIComponent(gtvtUrl)+'&t='+encodeURIComponent(gtvtTitle);smName.stumbleupon='StumbleUpon';smTrck.stumbleupon='StumbleUpon';smList.stumbleupon='http://www.stumbleupon.com/submit?url='+encodeURIComponent(gtvtUrl)+'&title='+encodeURIComponent(gtvtTitle);smName.reddit='Reddit';smTrck.reddit='Reddit';smList.reddit='http://reddit.com/submit?url='+encodeURIComponent(gtvtUrl)+'&title='+encodeURIComponent(gtvtTitle);smName.technorati='Technorati';smTrck.technorati='Technorati';smList.technorati='http://www.technorati.com/faves?add='+encodeURIComponent(gtvtUrl);smName.blinklist='Blinklist';smTrck.blinklist='BlinkList';smList.blinklist='http://blinklist.com/index.php?Action=Blink/addblink.php&Url='+encodeURIComponent(gtvtUrl)+'&Title='+encodeURIComponent(gtvtTitle);smName.newsvine='NewsVine';smTrck.newsvine='NewsVine';smList.newsvine='http://www.newsvine.com/_wine/save?u='+encodeURIComponent(gtvtUrl)+'&h='+encodeURIComponent(gtvtTitle);smName.magnolia='ma.gnolia';smTrck.magnolia='Magnolia';smList.magnolia='http://ma.gnolia.com/bookmarklet/add?url='+encodeURIComponent(gtvtUrl)+'&title='+encodeURIComponent(gtvtTitle);smName.tailrank='TailRank';smTrck.tailrank='TailRank';smList.tailrank='http://tailrank.com/share/?link_href=url='+encodeURIComponent(gtvtUrl)+'&title='+encodeURIComponent(gtvtTitle);smName.fark='Fark';smTrck.fark='Fark';smList.fark='http://cgi.fark.com/cgi/fark/farkit.pl?u='+encodeURIComponent(gtvtUrl)+'&h='+encodeURIComponent(gtvtTitle);smName.slashdot='Slashdot';smTrck.slashdot='Slashdot';smList.slashdot='http://slashdot.org/slashdot-it.pl?op=basic&url='+encodeURIComponent(gtvtUrl)+'&title='+encodeURIComponent(gtvtTitle);smName.myspace='MySpace';smTrck.myspace='MySpace';smList.myspace='http://www.myspace.com/Modules/PostTo/Pages/?l=3&u'+encodeURIComponent(gtvtUrl)+'&t='+encodeURIComponent(gtvtTitle)+'&c='+encodeURIComponent(gtvtDescription);smName.misterwong='Mister Wong';smTrck.misterwong='MisterWong';smList.misterwong='http://www.mister-wong.com/index.php?action=addurl&bm_url='+encodeURIComponent(gtvtUrl)+'&bm_description='+encodeURIComponent(gtvtTitle);smName.yahoobm='Yahoo! Bookmarks';smTrck.yahoobm='YahooBookmarks';smList.yahoobm='http://bookmarks.yahoo.com/toolbar/savebm?u='+encodeURIComponent(gtvtUrl)+'&t='+encodeURIComponent(gtvtTitle)+'&opener=bm&ei=UTF-8';smName.twitter='Twitter';smTrck.twitter='Twitter';smList.twitter='http://twitter.com/home?status='+encodeURIComponent(gtvtTitle)+' '+encodeURIComponent(gtvtUrl);smName.friendfeed='FriendFeed';smTrck.friendfeed='FriendFeed';smList.friendfeed='#mon';for(var i=0;i<services.length;i++){var smItem=services[i];var smTrckName=smTrck[smItem];listItem=document.createElement("li");list.appendChild(listItem);link=document.createElement("a");link.setAttribute("href",smList[smItem]);link.setAttribute("id","gtvt_"+smItem);link.setAttribute("title",smTrckName);link.setAttribute("target","_blank");link.onclick=grouptivity.createTracker(smTrck[smItem],gtvtUrl,gtvtTitle.replace("'","\\\'"),gtvtpId,gtvtCategory,smTrck[smItem]);image=document.createElement("img");image.setAttribute("src","http://cdn.grouptivity.com/main/api/webjs/images/"+smItem+".gif");image.setAttribute("align","absmiddle");link.appendChild(image);text=document.createTextNode(" "+smName[smItem]);link.appendChild(text);listItem.appendChild(link);};div3=document.createElement("div");div3.className="gtvt-clear";div2.appendChild(div3);div=document.createElement("div");div.setAttribute("id","gtvt-body-3");div.setAttribute("align","left");div.style.display="none";var inDiv=document.createElement("div");inDiv.setAttribute("id","mygtvt_div");inDiv.innerHTML="Loading...";div.appendChild(inDiv);tableTD.appendChild(div);div=document.createElement("div");div.setAttribute("id","gtvt-share-plus-app");tableTD.appendChild(div);table=document.createElement("table");table.setAttribute("cellpadding",0);table.setAttribute("cellspacing",0);table.setAttribute("width","100%");table.setAttribute("border","0");div.appendChild(table);tableBody2=document.createElement("tbody");table.appendChild(tableBody2);tableRow=document.createElement("tr");tableRow.setAttribute("valign","top");tableBody2.appendChild(tableRow);tableTD2=document.createElement("td");tableTD2.id="gtvt-login-register";tableTD2.className="gtvt-bottom-label";tableRow.appendChild(tableTD2);link=document.createElement("a");link.setAttribute("href","http://"+grouptivity.server+"/socialmail/login.do?pId="+(typeof gtvt_partner_id==='undefined'?"":encodeURIComponent(gtvt_partner_id)));link.setAttribute("target","_blank");tableTD2.appendChild(link);bold=document.createElement("b");link.appendChild(bold);text=document.createTextNode("Login");bold.appendChild(text);text=document.createTextNode(" | ");tableTD2.appendChild(text);link=document.createElement("a");link.setAttribute("href","http://"+grouptivity.server+"/socialmail/signup.do?pId="+(typeof gtvt_partner_id==='undefined'?"":encodeURIComponent(gtvt_partner_id)));link.setAttribute("target","_blank");tableTD2.appendChild(link);text=document.createTextNode("Register");link.appendChild(text);tableTD2=document.createElement("td");tableRow.appendChild(tableTD2);table=document.createElement("table");table.setAttribute("cellpadding",0);table.setAttribute("cellspacing",0);table.setAttribute("width","100%");table.setAttribute("border","0");tableTD2.appendChild(table);tableBody2=document.createElement("tbody");table.appendChild(tableBody2);tableRow=document.createElement("tr");tableRow.setAttribute("valign","top");tableBody2.appendChild(tableRow);tableTD2=document.createElement("td");tableRow.appendChild(tableTD2);div=document.createElement("div");div.setAttribute("align","right");div.className="gtvt-bottom-label";div.innerHTML="<b>Keep track of what<br/>you share with</b>";tableTD2.appendChild(div);tableRow=document.createElement("tr");tableRow.setAttribute("valign","top");tableBody2.appendChild(tableRow);tableTD2=document.createElement("td");tableRow.appendChild(tableTD2);div=document.createElement("div");div.setAttribute("align","right");tableTD2.appendChild(div);link=document.createElement("a");link.setAttribute("href","http://www.grouptivity.com/share");link.setAttribute("target","_blank");div.appendChild(link);image=document.createElement("img");image.setAttribute("src","http://cdn.grouptivity.com/main/api/webjs/images/shareplus.gif");image.setAttribute("align","right");image.setAttribute("border","0");link.appendChild(image);var bookmarkpopup=document.getElementById('g-bookmarkpopup');while(bookmarkpopup.hasChildNodes()){bookmarkpopup.removeChild(bookmarkpopup.lastChild);};bookmarkpopup.appendChild(maindiv);gtvtFrame=document.getElementById("g-iframe");if(gtvtFrame!=null&&typeof(gtvtFrame)!=='undefined'){gtvtFrame.style.position=bookmarkpopup.style.position;gtvtFrame.style.left=bookmarkpopup.style.left;gtvtFrame.style.top=bookmarkpopup.style.top;};bookmarkpopup.style.display='block';var gModDiv=document.getElementById('g-mod-div');gModDiv.style.display='block';if(gtvtFrame!=null&&typeof(gtvtFrame)!=='undefined'){grouptivity.resizeIframe();gtvtFrame.style.display="block";};grouptivity.processAutoComplete();};



