//BashIt_JS var timeidB = Array(); var FontsizeB = 100; var tempCountB = 140; function myclearTimeoutB(id) { clearTimeout(timeidB[id]); } function waitToShrinkB(id) { timeidB[id] = window.setTimeout("processBashShrink(10, '" + id + "')", 30); } function processBashCounter (id) { waitToShrinkB(id); } function processBashShrink(currentFontSize, id) { //alert("Bash Counter for " + id); if (currentFontSize >= 1) { FontsizeB -= 10; document.getElementById('BashCount'+id).style.fontSize = FontsizeB+'%'; if (currentFontSize > 1) { currentFontSize -= 1; timeidB[id] = window.setTimeout("processBashShrink(" + currentFontSize + ", '" + id + "')", 30); } else { tempCountB++; bashCount = document.getElementById('BashCount' + id); //BashIt.IncrementBash(id, bashCount.innerHTML, cb_IncrementBash); //alert(""); ShoutIt.IncrementBash(id, bashCount.innerHTML, cb_IncrementBash); } } } function cb_IncrementBash(id) { var Bash = true; // user id or ip address not verified if (!id.value.UserVerified) { window.location = "http://www.shoutwire.com/default.aspx?p=logoutandnotify&msg=" + id.value.UserVerifiedMsg; //window.location = "http://80.249.236.21/default.aspx?p=logoutandnotify&msg=" + id.value.UserVerifiedMsg; return; } //User is not logged in if(id.value.UserID == "0") { //alert("You must be a registered and logged in user of ShoutWire.com to be able to Shout for articles you like."); var IsConsumerFeed = document.getElementById("IsConsumerFeed").value; var currURL = "" + window.location + ""; // if frame view, set as consumer feed if (currURL.indexOf("Frame.aspx") != -1) IsConsumerFeed = 1; // If coming from a feed or a viewstory frame, redirect to shoutwire registration page if (IsConsumerFeed == 1) { if (readCookie("FeedNotification") == null) { createCookie("FeedNotification","1",null); window.top.location = "http://www.shoutwire.com/register?msg=notregistered&id=" + id.value.BashID; } else { eraseCookie("FeedNotification"); target1 = document.getElementById('BashCount' + id.value.BashID); target1.innerHTML = id.value.BashCount; timeidB[id] = window.setTimeout("processBashUnshrink(10, " + id.value.BashID + ")",30); } return; } else { // else, it is from shoutwire, display div pop up var swID = id.value.BashID; var topbottom = 55; var left = 50; // grab a reference to the container div for this shout it item var swDiv = document.getElementById("sw_item_" + swID); var regMessage = "Join the ShoutWire community! "; var msgOutput = ""; regMessage += "
Please register an account or sign in here
"; regMessage += "
Close Window
"; msgOutput += "
" msgOutput += "
"; msgOutput += "
"; msgOutput += "
"; msgOutput += "
" + regMessage + "
"; msgOutput += "
"; msgOutput += "
"; msgOutput += "
"; msgOutput += "
"; swDiv.innerHTML += msgOutput; } Bash = false; } //Duplicate shout detected if(id.value.Dupe) { alert("You have already Bashed this article."); Bash = false; } if (Bash) document.getElementById('Bashed' + id.value.BashID).innerHTML = 'Bashed'; //document.getElementById('Bashed' + id.value.BashID).innerHTML = 'Bashed'; target1 = document.getElementById('BashCount' + id.value.BashID); target1.innerHTML = id.value.BashCount; timeidB[id] = window.setTimeout("processBashUnshrink(10, " + id.value.BashID + ")",30); } function closeDivB(identifier) { var dvElement = document.getElementById("rw_" + identifier); dvElement.parentNode.removeChild(dvElement); } function processBashUnshrink(currentFontSize, id) { if (currentFontSize >= 1) { FontsizeB += 10; document.getElementById('BashCount' + id).style.fontSize = FontsizeB+'%'; if (currentFontSize > 1) { currentFontSize -= 1; timeidB[id] = window.setTimeout("processBashUnshrink(" + currentFontSize + ",'" + id + "')", 30); } else { currentFontSize -= 1; myclearTimeoutB(0); } } } /* function problemTime (list, myForm, ArticleID, baseURL) { var length = list.length; var i = 0; var url; while (i < length) { if (list[i].selected && i != 3) { url = "http://www.shoutwire.com/default.aspx?p=problem&id=" + ArticleID + "&code=" + list[i].value; break; } i++; } window.location = url; } */ //LEFT OFF HERE //Just got the item.name property to read, now I can figure out what irframe to load data from my array to. /* function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } */ /* function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } */ /* function eraseCookie(name) { createCookie(name,"",-1); } */ // shows a div pop up inside a div with DivID, // for some reason feeding in "'s in the Message screws it up // so replace your "'s with #'s before sending in your message function ShowDIVPopUpB (DivID,Message,Top) { var swDiv = document.getElementById(DivID); var topbottom = 0; var left = 140; var regMessage = ""; var msgOutput = ""; regMessage += Message.replace(/#/g,"\""); msgOutput += "
" msgOutput += "
"; msgOutput += "
"; msgOutput += "
Close Window
"; msgOutput += "
" + regMessage + "
"; msgOutput += "
"; msgOutput += "
"; msgOutput += "
"; msgOutput += "
"; swDiv.innerHTML += msgOutput; } function CloseDIVPopUPB(DivID) { var dvElement = document.getElementById("DIVPopUP-"+DivID); dvElement.parentNode.removeChild(dvElement); }