//ShoutIt_JS var timeid = Array(); var Fontsize = 100; var tempCount = 140; function myclearTimeout(id) { clearTimeout(timeid[id]); } function waitToShrink(id) { timeid[id] = window.setTimeout("processShoutShrink(10, '" + id + "')", 30); } function processShoutCounter (id) { waitToShrink(id); } function processShoutShrink(currentFontSize, id) { if (currentFontSize >= 1) { Fontsize -= 10; document.getElementById('ShoutCount'+id).style.fontSize = Fontsize+'%'; if (currentFontSize > 1) { currentFontSize -= 1; timeid[id] = window.setTimeout("processShoutShrink(" + currentFontSize + ", '" + id + "')", 30); } else { tempCount++; shoutCount = document.getElementById('ShoutCount' + id); ShoutIt.IncrementShout(id, shoutCount.innerHTML, cb_IncrementShout); } } } function cb_IncrementShout(id) { var Shout = 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.ShoutID; } else { eraseCookie("FeedNotification"); target1 = document.getElementById('ShoutCount' + id.value.ShoutID); target1.innerHTML = id.value.ShoutCount; timeid[id] = window.setTimeout("processShoutUnshrink(10, " + id.value.ShoutID + ")",30); } return; } else { // else, it is from shoutwire, display div pop up var swID = id.value.ShoutID; var topbottom = 0; 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; } Shout = false; } //Duplicate shout detected if(id.value.Dupe) { alert("You have already Shouted this article."); Shout = false; } if (Shout) document.getElementById('Shouted' + id.value.ShoutID).innerHTML = 'Shouted'; target1 = document.getElementById('ShoutCount' + id.value.ShoutID); target1.innerHTML = id.value.ShoutCount; timeid[id] = window.setTimeout("processShoutUnshrink(10, " + id.value.ShoutID + ")",30); } function closeDiv(identifier) { var dvElement = document.getElementById("rw_" + identifier); dvElement.parentNode.removeChild(dvElement); } function processShoutUnshrink(currentFontSize, id) { if (currentFontSize >= 1) { Fontsize += 10; document.getElementById('ShoutCount' + id).style.fontSize = Fontsize+'%'; if (currentFontSize > 1) { currentFontSize -= 1; timeid[id] = window.setTimeout("processShoutUnshrink(" + currentFontSize + ",'" + id + "')", 30); } else { currentFontSize -= 1; myclearTimeout(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 ShowDIVPopUp (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 CloseDIVPopUP(DivID) { var dvElement = document.getElementById("DIVPopUP-"+DivID); dvElement.parentNode.removeChild(dvElement); }