var domain='http://www.dealstudio.com'; var cookie_domain=''; var cookie_path=''; var cookie_secure=0; var ajax = new sack(); function set_cookie( name, value) { // set time, it's in milliseconds var today = new Date(); /* if the expires variable is set, make the correct expires time, the current script below will set it for x number of days, to make it for hours, delete * 24, for minutes, delete * 60 * 24 */ expires = 360 * 1000 * 60 * 60 * 24; //360 days expiration var expires_date = new Date( today.getTime() + (expires) ); var path=cookie_path; var domain=cookie_domain; var secure=cookie_secure; document.cookie = name + "=" +escape( value ) + ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + ( ( path ) ? ";path=" + path : "" ) + ( ( domain ) ? ";domain=" + domain : "" ) + ( ( secure ) ? ";secure" : "" ); } function get_cookie( name ) { var start = document.cookie.indexOf( name + "=" ); var len = start + name.length + 1; if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) { return null; } if ( start == -1 ) return null; var end = document.cookie.indexOf( ";", len ); if ( end == -1 ) end = document.cookie.length; return unescape( document.cookie.substring( len, end ) ); } function delete_cookie( name) { var path=cookie_path; var domain=cookie_domain; if ( get_cookie( name ) ) document.cookie = name + "=" + ( ( path ) ? ";path=" + path : "") + ( ( domain ) ? ";domain=" + domain : "" ) + ";expires=Thu, 01-Jan-1970 00:00:01 GMT"; } function togglediv(id) { //safe function to hide an element with a specified id if (document.getElementById) { // DOM3 = IE5, NS6 if( document.getElementById(id).style.display == 'none') document.getElementById(id).style.display = 'block'; else document.getElementById(id).style.display = 'none' } else { if (document.layers) { // Netscape 4 if( document.id.display == 'none') document.id.display = 'block'; else document.id.display = 'none' } else { // IE 4 if( document.all.id.style.display == 'none') document.all.id.style.display = 'block'; else document.all.id.style.display = 'none' } } } function showdiv(id, flag) { //safe function to hide an element with a specified id if (document.getElementById) { // DOM3 = IE5, NS6 if( flag == 1) document.getElementById(id).style.display = 'block'; else document.getElementById(id).style.display = 'none' } else { if (document.layers) { // Netscape 4 if( flag == 1) document.id.display = 'block'; else document.id.display = 'none' } else { // IE 4 if( flag == 1) document.all.id.style.display = 'block'; else document.all.id.style.display = 'none' } } } var searchmenu_item=['deal', 'coupon', 'freebie', 'promotion', 'filler', 'price', 'sunday', 'hot', 'forum']; var default_searchtext=[]; default_searchtext['deal']='Enter keywords and/or store: iphone amazon.com'; default_searchtext['coupon']='Enter keywords and/or store: iphone amazon.com'; default_searchtext['freebie']='Enter keywords and/or store: iphone amazon.com'; default_searchtext['promotion']='Enter keywords and/or store: iphone amazon.com'; default_searchtext['filler']='Enter store domain: amazon.com'; default_searchtext['price']='Enter product keywords: apple iphone'; default_searchtext['sunday']='Enter store domain: staples.com'; default_searchtext['hot']='Enter product keywords: apple iphone'; default_searchtext['forum']='Enter keywords: free iphone'; function closeFAQ() { var e=document.getElementById('faqbanner'); if(e) e.style.display='none'; } function selectSearch(id) { var e; var menu_id var i; for(i=0; i/g, '>'); p_string = p_string.replace(/"/g, '"'); // p_string = p_string.replace(/'/g, '''); return p_string; } function strip_tags(str, allowed_tags) { // http://kevin.vanzonneveld.net // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + improved by: Luke Godfrey // + input by: Pul // + bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + bugfixed by: Onno Marsman // + input by: Alex // + bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + input by: Marc Palau // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + input by: Brett Zamir (http://brettz9.blogspot.com) // + bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + bugfixed by: Eric Nagel // + input by: Bobby Drake // + bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // * example 1: strip_tags('

Kevin


van Zonneveld', ''); // * returns 1: 'Kevin van Zonneveld' // * example 2: strip_tags('

Kevin van Zonneveld

', '

'); // * returns 2: '

Kevin van Zonneveld

' // * example 3: strip_tags("Kevin van Zonneveld", ""); // * returns 3: 'Kevin van Zonneveld' // * example 4: strip_tags('1 < 5 5 > 1'); // * returns 4: '1 < 5 5 > 1' var key = '', allowed = false; var matches = []; var allowed_array = []; var allowed_tag = ''; var i = 0; var k = ''; var html = ''; var replacer = function(search, replace, str) { return str.split(search).join(replace); }; // Build allowes tags associative array if (allowed_tags) { allowed_array = allowed_tags.match(/([a-zA-Z]+)/gi); } str += ''; // Match tags matches = str.match(/(<\/?[\S][^>]*>)/gi); // Go through all HTML tags for (key in matches) { if (isNaN(key)) { // IE7 Hack continue; } // Save HTML tag html = matches[key].toString(); // Is tag not in allowed list? Remove from str! allowed = false; // Go through all allowed tags for (k in allowed_array) { // Init allowed_tag = allowed_array[k]; i = -1; if (i != 0) { i = html.toLowerCase().indexOf('<'+allowed_tag+'>');} if (i != 0) { i = html.toLowerCase().indexOf('<'+allowed_tag+'/>');} //jason hacker to allow
if (i != 0) { i = html.toLowerCase().indexOf('<'+allowed_tag+' ');} if (i != 0) { i = html.toLowerCase().indexOf(' to enclose normal text'); html=temp;} e.innerHTML='  *Text new line has been replaced by html new line <br/>    
'; } } } function preview_html(id) { var e_id='htmleditor_'+id; var e=document.getElementById(e_id); if(e) { var html_id='textarea_'+id; var f=document.getElementById(html_id); if(f) { var temp=f.value.replace(/\n/g, "
"); temp=strip_tags(temp, '