function OpenAbuseWindow(ObjectID, ObjectType, SiteID) { var URL = "http://www.copperstrings.com/ReportAbuse.aspx?ObjectID=" + ObjectID + "&ObjectType=" + ObjectType + "&SiteID=" + SiteID + "&AbuseUrl=" + encodeURIComponent(document.location.href); var oWin = window.open(URL, "Abuse", "toolbar=0,menu=0,width=500,Left=150,height=550,top=150,scrollbars=1"); oWin.opener = self; oWin.focus(); } function OpenContactUs(SiteID) { var URL = "http://www.copperstrings.com/ContactForComments.aspx?SiteID=" + SiteID; var oWin = window.open(URL , "Contact", "toolbar=0,menu=0,width=500,height=400,scrollbars=1"); oWin.opener = self; oWin.focus(); } function OpenTellFriend(SiteID, ItemType, ItemID) { var URL = "http://www.copperstrings.com/Broadcast/TellAFriend.aspx?SiteID=" + SiteID + "&PageUrl=" + encodeURIComponent(document.location.href) + "&ItemType=" + ItemType + "&ItemID=" + ItemID; var oWin = window.open(URL , "TellAFriend", "toolbar=0,menu=0,width=710,height=650,scrollbars=1"); oWin.opener = self; oWin.focus(); } function OpenTellFriendForMeditation(SiteID) { var pageURL = "http://www.copperstrings.com/Meditation/default.aspx"; var URL = "http://www.copperstrings.com/Broadcast/TellAFriend.aspx?SiteID=" + SiteID + "&PageUrl=" + encodeURIComponent(pageURL) + "&ItemType=2&ItemID=-1"; var oWin = window.open(URL , "TellAFriend", "toolbar=0,menu=0,width=710,height=650,scrollbars=1"); oWin.opener = self; oWin.focus(); } Client_ModalPopup = function(ClientID, PosX, PosY, InnerHTML) { this._clientID = ClientID; this._innerHTML = InnerHTML; this._posX = PosX; this._posY = PosY; this._mainElement = null; this.initialize(); } Client_ModalPopup.prototype = { initialize: function() { this._mainElement = document.createElement('div'); this._mainElement.id = this.get_clientID() + '_mainElement'; this._mainElement.style.display = 'none'; this._mainElement.style.position = 'absolute'; this._mainElement.style.left = this._posX + 'px'; this._mainElement.style.top = this._posY + 'px'; this._mainElement.style.zIndex = 10000 + 1; this._mainElement.innerHTML = this._innerHTML; document.body.appendChild(this._mainElement); }, show: function() { this._mainElement.style.display = ''; this.layout(); }, layout: function() { }, hide: function() { this._mainElement.style.display = 'none'; }, get_clientID: function() { return this._clientID; }, set_clientID: function(value) { this._clientID = value; }, get_innerHTML: function() { return this._innerHTML; }, set_innerHTML: function(value) { this._innerHTML = value; }, isVisible: function() { if (this._mainElement.style.display == 'none') return false; else return true; } } function openWikiNewBox() { if (newWikiPopup.isVisible()) newWikiPopup.hide(); else newWikiPopup.show(); } function wikiNavigation(Top, Left) { if (newWikiPopup == null) newWikiPopup = new Client_ModalPopup('popup_New_Wiki', Top, Left, CreateInnerHTML()); openWikiNewBox(); } function GetWikiKeywordURL() { var nItem = document.getElementById('txtWikiKeyword').value; var myNew = ''; if (nItem != '') myNew = "http://www.copperwiki.org/index.php/" + nItem; return myNew; } function WikiKeywordGo() { var myForm = document.getElementById('frmWiki'); var myNew = GetWikiKeywordURL(); myForm.action = myNew; newWikiPopup.hide(); } function HideWikiKeyword() { var myForm = document.getElementById('frmWiki'); myForm.action = ''; newWikiPopup.hide(); return false; } function handleSubmit(myForm) { if (myForm.txtWikiKeyword.value == '') { newWikiPopup.hide(); return false; } else { if (myForm.action == '') return false; myForm.action = GetWikiKeywordURL(); if (myForm.action == '') return false; return true; } } function CreateInnerHTML() { var strInner = ""; strInner = "
"; strInner += ""; strInner += ""; strInner += ""; strInner += "
Search Keyword or Topic: 
"; return strInner; } var newWikiPopup = null; // For Moving to An Element function InView(element,margin) { if(!margin) margin=0; var Top = GetTop(element), ScrollTop = GetScrollTop(); return !(Top < ScrollTop + margin || Top > ScrollTop + GetWindowHeight() - element.offsetHeight - margin); } function ScrollIntoView(element,bAlignTop,margin) { if(!margin) margin=0; var posY = GetTop(element); if(bAlignTop) posY -= margin; else posY += element.offsetHeight + margin - GetWindowHeight(); window.scrollTo(0, posY); } function GetWindowHeight() { return window.innerHeight || document.documentElement && document.documentElement.clientHeight || document.body.clientHeight || 0; } function GetScrollTop() { return window.pageYOffset|| document.documentElement && document.documentElement.scrollTop || document.body.scrollTop || 0; } function GetTop(element) { var pos=0; do pos+=element.offsetTop while(element=element.offsetParent); return pos; } function LoadMyStartup(forID) { var an = document.getElementById(forID); if (an == null) return; ScrollIntoView(an, true, false); an.scrollIntoView(true); }