// default variables: var mytestbox_widget_title; var mytestbox_widget_outer_style; var mytestbox_widget_inner_style; var mytestbox_widget_title_style; var mytestbox_widget_link_style; var mytestbox_widget_top_style; var mytestbox_widget_bottom_style; var mytestbox_widget_separator_style; var mytestbox_widget_show_scroll; var mytestbox_widget_show_tooltip; var mytestbox_widget_tooltip_style; var mytestbox_widget_number_titles; var mytestbox_widget_link_background_color; var mytestbox_widget_link_mouseover_color; // use values provided by enclosing site if available, else use defaults: if (!mytestbox_widget_title) { mytestbox_widget_title = "MyTestBox.com - web software reviews"; } if (!mytestbox_widget_outer_style) { mytestbox_widget_outer_style = "background-color:#dddddd;border:1px solid #999999;width:160px;"; } if (!mytestbox_widget_inner_style) { mytestbox_widget_inner_style = "background-color:#ffffff;color:#666666;border:1px solid #999999;padding:10px 10px 2px 8px;font:11px Arial, Helvetica, Sans-serif;line-height:16px;"; } if (!mytestbox_widget_title_style) { mytestbox_widget_title_style = "font-family:verdana,helvetica;font-size:11px;color:#313131;font-weight:bold;text-align:center"; } if (!mytestbox_widget_link_style) { mytestbox_widget_link_style = "color:#0464bb;font-size:11px;font-weight:normal;text-decoration:none;"; } if (!mytestbox_widget_top_style) { mytestbox_widget_top_style = "padding-top:2px;"; } if (!mytestbox_widget_bottom_style) { mytestbox_widget_bottom_style = "padding-bottom:2px;";} if (!mytestbox_widget_separator_style) { mytestbox_widget_separator_style = "border-bottom:1px solid #9E9E9E;";} if (!mytestbox_widget_show_scroll) { mytestbox_widget_show_scroll = '';} if (!mytestbox_widget_link_background_color) { mytestbox_widget_link_background_color = "#FEFEFE"; } if (!mytestbox_widget_link_mouseover_color) { mytestbox_widget_link_mouseover_color = "#edebf1"; } if (!mytestbox_widget_outer_style) { mytestbox_widget_outer_style = "background-color:#dddddd;border:1px solid #999999;width:160px;"; } /* if (!mytestbox_widget_show_scroll) { mytestbox_widget_show_scroll = 0;} if (mytestbox_widget_show_scroll != 0) { mytestbox_widget_show_scroll = 'overflow:scroll;' } else { mytestbox_widget_show_scroll = 'overflow:hidden;' } */ if (!mytestbox_widget_show_tooltip) { mytestbox_widget_show_tooltip = -220;} if (!mytestbox_widget_tooltip_style) { mytestbox_widget_tooltip_style = "border: solid #999999 1px; width: 200px; padding: 5px; background-color: #f6f6f6; color: #000000;font-family:verdana,arial,helvetica;font-size:11px"; } if (!mytestbox_widget_number_titles) { mytestbox_widget_number_titles = 5; } // then regardless of source, add to some of those styles: //mytestbox_widget_title_style += 'font-family:verdana,helvetica;font-size:11px;color:#313131;font-weight:bold;text-align:center;'; //mytestbox_widget_bottom_style += ';padding-bottom:4px;'; mytextbox_widget_link_style = 'color:#0464bb;font-size:11px;font-weight:normal;text-decoration:none;border:none;'; var widget_code = ''; widget_code += '<script type="text/javascript">\n'; widget_code += 'var mytestbox_widget_number_titles = "'+mytestbox_widget_number_titles+'";\n'; widget_code += 'var mytestbox_widget_show_scroll = "'+mytestbox_widget_show_scroll+'"; //No scroll bar = ""; Scroll bar = "height:250px"\n'; widget_code += 'var mytestbox_widget_tooltip_style = "'+mytestbox_widget_tooltip_style+'";\n'; widget_code += 'var mytestbox_widget_title = "'+mytestbox_widget_title+'";\n'; widget_code += 'var mytestbox_widget_outer_style = "'+mytestbox_widget_outer_style+'";\n'; widget_code += 'var mytestbox_widget_inner_style = "'+mytestbox_widget_inner_style+'";\n'; widget_code += 'var mytestbox_widget_title_style = "'+mytestbox_widget_title_style+'";\n'; widget_code += 'var mytestbox_widget_link_style = "'+mytestbox_widget_link_style+'";\n'; widget_code += 'var mytestbox_widget_link_background_color = "'+mytestbox_widget_link_background_color+'";\n'; widget_code += 'var mytestbox_widget_link_mouseover_color = "'+mytestbox_widget_link_mouseover_color+'";\n'; //widget_code += 'var mytestbox_widget_top_style = "'+mytestbox_widget_top_style+'";\n'; widget_code += 'var mytestbox_widget_separator_style = "'+mytestbox_widget_separator_style+'"; \n'; widget_code += '</script>\n'; widget_code += '<script type="text/javascript" src="http://www.mytestbox.com/widget/"></script>'; // Container div document.write('
'); // -------- create the div that will hold the tooltips: document.write('\n'); // -------- create the div that will hold the "grab this widget" tooltips: var close_link = '
Close
'; var grab_head = '
Grab the code for this widget
(the widget will look like on this website)

'; var code_block = ''; var grab_foot = '

Want to customize this widget easily to fit your needs?
Then go to our Widget Page
(no registration required)
'; document.write('\n'); // and we get the array of descriptions, for use in the tool tips var descriptions = new Array( " OpenX, the well known open source ad server software company, is looking to hire experienced open source web developers.They have several projects and wants developers with proven experience extending open source content management systems or analytics tools. One big appeal: the location of the developers doesn’t matter! The work can be done remotely (I don’t [...]", " According to Associated Press US Senate just passed, unanimously, the intellectual property bill (today - Friday, September 26). This would give the Justice Department more resources to combat intellectual property theft, including patent and trademark infringement, counterfeiting and copyright crimes. This bill also would authorize funding for federal and local law enforcement to fight intellectual property [...]", " Everyone can build a website, but not not everyone can build a good and popular website. If you can pull it off, you can enjoy benefits like building something people are using, recognition and - sometimes - money. It can be a good business, even your full time job. But bad things can happen, and [...]", " With over 1 Million iPhone application downloads, Pandora’s  mobile ad platform is ready for prime time! But for now you have to wait in line: Best Buy and Beck’s beer signed the #1 and #2 premiere contracts for Pandora’s iPhone ad platform (the contracts secure their rights to be the exclusive advertisers on the new mobile [...]", " The latest release of Magento, Version 1.1.6, was released this week and contained updates to the admin, a new design Skin and more. To coincide with the availability of 1.1.6, the Magento Team at Varien also released a new Blank Theme to assist designers in creating new custom themes for Magento.Version 1.1.6 is now available [...]", " MacsDesign Studio LLC, the developers the Web Help Desk (the leading cross-platform help desk software solution), announced today the integration with Apple Remote Desktop 3, Apple’s award-winning desktop management system for Mac OS X. The easy access to ARD information and instant remote control connectivity from within the Web Help Desk promises to boost technician productivity [...]", " Yes, we build web applications…and there are plenty of them around. Some are or will be presented here on MyTestBox.com. Now, if we hit the jackpot and our application becomes very popular, traffic goes up, and our servers are brought down by the hordes of people coming to our website. What do we do [...]", " If you have a blog and allow open registration, then you definitely need to upgrade to this version!   There’s a security hole in the actual version of Wordpress which allows an attacker to randomly change passwords of other registered users (done by crafting an username). The passwords won’t be revealed to the attacker himself, but it [...]", " Zen Cart (or ZenCart) www.zencart.com has been developed by group of professionals from Newcastle, England, Cleveland, Ohio and Ontario, Canada. It’s not a simple shopping cart module, but truly professional ecommerce store management platform (named also a shopping cart system) with newsletters, coupons, gift certificates, etc more capable to run Amazon type of stores than [...]", " I’m sure that many early technology adopters already found out about FriendFeed, the lifestream aggregator. What this does it merges your RSS feeds into one feed. And I’m giving you an example: let’s say you have an account on Facebook, StumbleUpon, Flickr, Twitter, LinkedIn, Amazon Whislits or even your personal blog…you can aggregate all the [...]" ); // Date of feeds var dates = new Array( "09/29/2008 ", "09/26/2008 ", "09/23/2008 ", "09/22/2008 ", "09/20/2008 ", "09/18/2008 ", "09/10/2008 ", "09/09/2008 ", "09/02/2008 ", "08/29/2008 " ); // Find div coordinate function findPos(obj) { var curleft = curtop = 0; if (obj.offsetParent) { do { curleft += obj.offsetLeft; curtop += obj.offsetTop; } while (obj = obj.offsetParent); return [curleft,curtop]; } } // Functions for calculating cursor position function getPosition(e) { e = e || window.event; var cursor = {x:0, y:0}; if (e.pageX || e.pageY) { cursor.x = e.pageX; cursor.y = e.pageY; } else { var de = document.documentElement; var b = document.body; cursor.x = e.clientX + (de.scrollLeft || b.scrollLeft) - (de.clientLeft || 0); cursor.y = e.clientY + (de.scrollTop || b.scrollTop) - (de.clientTop || 0); } return cursor; } // Function for getting size of an element GetWidth = function(elem) { function _Convert(val) { if (!val) {return;} val = val.replace("px",""); if (isNaN(val)) {return 0;} return parseInt(val); } var currentStyle; if (elem.currentStyle) { currentStyle = elem.currentStyle; } else if (window.getComputedStyle) { currentStyle = document.defaultView.getComputedStyle(elem, null); } else { currentStyle = elem.style; } return (elem.offsetWidth - _Convert(currentStyle.marginLeft) - _Convert(currentStyle.marginRight) - _Convert(currentStyle.borderLeftWidth) - _Convert(currentStyle.borderRightWidth)); } GetHeight = function(elem) { function _Convert(val) { if (!val) {return;} val = val.replace("px",""); if (isNaN(val)) {return 0;} return parseInt(val); } var currentStyle; if (elem.currentStyle) { currentStyle = elem.currentStyle; } else if (window.getComputedStyle) { currentStyle = document.defaultView.getComputedStyle(elem, null); } else { currentStyle = elem.style; } return (elem.offsetHeight - _Convert(currentStyle.marginTop) - _Convert(currentStyle.marginBottom) - _Convert(currentStyle.borderTopWidth) - _Convert(currentStyle.borderBottomWidth)); } // Function for getting browser window size function getBrowserWidth() { var myWidth = 0, myHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE myWidth = window.innerWidth; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myWidth = document.body.clientWidth; } return myWidth; } function getBrowserHeight() { var myWidth = 0, myHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myHeight = document.body.clientHeight; } return myHeight; } // our tooltip functions: // then the functions to use it: function tooltipOff( ) { document.getElementById("WIDGET_TOOLTIP").style.display = "none"; } function getScrollXY() { var scrOfX = 0, scrOfY = 0; if( typeof( window.pageYOffset ) == 'number' ) { //Netscape compliant scrOfY = window.pageYOffset; scrOfX = window.pageXOffset; } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) { //DOM compliant scrOfY = document.body.scrollTop; scrOfX = document.body.scrollLeft; } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) { //IE6 standards compliant mode scrOfY = document.documentElement.scrollTop; scrOfX = document.documentElement.scrollLeft; } var scrollOffset = {x:0, y:0} scrollOffset.x = scrOfX; scrollOffset.y = scrOfY; return scrollOffset; } //get the first 650 characters to show in the tooltip function Left(str, n){ if (n <= 0) return ""; else if (n > String(str).length) return str; else return String(str).substring(0,n); } function tooltip(which,where,e) { // Distance between cursor and the tooltip var x_offset = 20; var y_offset = 20; var dv = document.getElementById("WIDGET_TOOLTIP"); //dv.innerHTML = Left(descriptions[which],650) + '

'+ dates[which] + '

'; dv.innerHTML = Left(descriptions[which],650) + ' [...]


'+ dates[which] + ''; var node = where; // Get cursor position var x = 0; var y = 0; // Get scroll offset var scroll = getScrollXY(); var cursor = getPosition(e); x = cursor.x; y=cursor.y; // Decide to show box left or right dv.style.display = "block"; dv.style.visibility = "hidden"; var width = GetWidth(dv); var height = GetHeight(dv); var div_coord = findPos(document.getElementById('my_widget_container')); div_x = div_coord[0]; div_y = div_coord[1]; var browserWidth = getBrowserWidth(); var browserHeight = getBrowserHeight(); // Check if tooltip can display on right if (x - scroll.x + width + x_offset < browserWidth) { // Display on the right x = x + x_offset; } else { // Display tooltip on the left x = x - width - x_offset; } // Check if tooltip can display at bottom if (y - scroll.y + height + y_offset < browserHeight) { // Display at the bottom y = y + y_offset; } else { // Display tooltip on top y = y - height - y_offset; } // Set coordinate of top left corner, relative to container dv.style.left = (x - div_x) + "px"; dv.style.top = (y - div_y) + "px"; dv.style.visibility = "visible"; } function grabtooltip(e) { // Distance between cursor and the tooltip var x_offset = 20; var y_offset = 20; var dv = document.getElementById("GRAB_TOOLTIP"); dv.style.width='350px'; //dv.innerHTML = descriptions[which] + '

'+ dates[which] ; //dv.innerHTML = descriptions[which] + '


'+ dates[which] + '

'; //dv.innerHTML = 'test'; //var node = where; // Get cursor position var x = 0; var y = 0; // Get scroll offset var scroll = getScrollXY(); var cursor = getPosition(e); x = cursor.x; y=cursor.y; var temp_x = cursor.x; // Decide to show box left or right dv.style.display = "block"; dv.style.visibility = "hidden"; var width = GetWidth(dv); var height = GetHeight(dv); var div_coord = findPos(document.getElementById('my_widget_container')); div_x = div_coord[0]; div_y = div_coord[1]; var browserWidth = getBrowserWidth(); var browserHeight = getBrowserHeight(); // Check if tooltip can display on right if (x - scroll.x + width + x_offset < browserWidth) { // Display on the right x = x + x_offset; } else { // Display tooltip on the left x = x - width - x_offset; } // Check if tooltip can display on top if (y - scroll.y - height - y_offset > 0) { // Display tooltip on top y = y - height - y_offset; } else { // Display at the bottom y = y + y_offset; } // Set coordinate of top left corner, relative to container dv.style.left = (x - div_x) + "px"; dv.style.top = (y - div_y) + "px"; dv.style.visibility = "visible"; //document.getElementById('test').innerHTML = (x-div_x) + ' '+(y-div_y) ; } // header document.write('
\n' + '
\n' + '
\n' + mytestbox_widget_title + '
\n' + '
\n' ); // scrolloable content start document.write('
\n' + '
\n' ); // document.write('
\n' // ); if ( 0 < mytestbox_widget_number_titles ) { document.write('
' + 'Web developers: OpenX, the ad server software company, wants you!' + '
\n' ); } else { document.write('\n' ); } if ( 1 < mytestbox_widget_number_titles ) { document.write('
' + 'US Senate passes intellectual property bill (this interests software makers as well)' + '
\n' ); } else { document.write('\n' ); } if ( 2 < mytestbox_widget_number_titles ) { document.write('
' + 'Cloud computing, grid computing, utility computing - list of top providers' + '
\n' ); } else { document.write('\n' ); } if ( 3 < mytestbox_widget_number_titles ) { document.write('
' + 'Pandora’s iPhone Mobile Ad Platform launched today: Best Buy and Becks nab first positions' + '
\n' ); } else { document.write('\n' ); } if ( 4 < mytestbox_widget_number_titles ) { document.write('
' + 'Magento Commerce continues to gain momentum (450,000+ downloads to date)' + '
\n' ); } else { document.write('\n' ); } if ( 5 < mytestbox_widget_number_titles ) { document.write('
' + 'Web Help Desk software is integrated now with Apple Remote Desktop' + '
\n' ); } else { document.write('\n' ); } if ( 6 < mytestbox_widget_number_titles ) { document.write('
' + 'Content Delivery Networks (CDN) – a comprehensive list of providers' + '
\n' ); } else { document.write('\n' ); } if ( 7 < mytestbox_widget_number_titles ) { document.write('
' + 'Security update from Wordpress: version 2.6.2' + '
\n' ); } else { document.write('\n' ); } if ( 8 < mytestbox_widget_number_titles ) { document.write('
' + 'ZenCart – open source professional ecommerce software solution review' + '
\n' ); } else { document.write('\n' ); } if ( 9 < mytestbox_widget_number_titles ) { document.write('
' + 'Your personal hosted FriendFeed replica: SweetCron - the automated lifestream blog software' + '
\n' ); } else { document.write('\n' ); } // scrollable content end document.write( '
\n' + '
\n' ); // bottom document.write('
\n' + '
\n' ); document.write('
');