var config=new Array();
config['title_color'] = (typeof lavoz_title_color != 'undefined' && isColor(lavoz_title_color))? lavoz_title_color : "#0000CC";
config['box_border'] = (typeof lavoz_box_border != 'undefined' && isColor(lavoz_box_border))? lavoz_box_border : "#6696C6";
config['box_bg'] = (typeof lavoz_box_bg != 'undefined' && isColor(lavoz_box_bg))? lavoz_box_bg : "#FFFFFF";
config['box_width'] =(typeof lavoz_box_width != 'undefined' && !isNaN(lavoz_box_width))? lavoz_box_width : 468;
config['box_height'] =(typeof lavoz_box_height != 'undefined' && !isNaN(lavoz_box_height) )? lavoz_box_height : 60;
config['box_pause'] = 3;
function blackOrWhite(input){var color=(input.indexOf("#")==0?input.substring(1):input);var nn = parseInt(color,16);if(isNaN(nn)){return "#000000";}else if(nn < parseInt("CCCCCC",16)){return "#FFFFFF";}else{return "#000000";}};
function isColor(input){var color=(input.indexOf("#")==0?input.substring(1):input);color=color.toUpperCase();return (color.length==6&&checkHex(color)==true)?1:0;};
function checkHex(input){for (var i=0; i<input.length; i++){var ch = input.charAt(i);if ((ch < '0' || ch > '9') && (ch < 'A' || ch > 'F'))return(false);};return(true);};
function URLEncode(clearString){var output = '';var x = 0;clearString = clearString.toString();var regex = /(^[a-zA-Z0-9_.]*)/;while (x < clearString.length) {var match = regex.exec(clearString.substr(x));if (match != null && match.length > 1 && match[1] != '') {output += match[1];x += match[1].length;} else {if (clearString[x] == ' ')output += '+';else {var charCode = clearString.charCodeAt(x);var hexVal = charCode.toString(16);output += '%' + ( hexVal.length < 2 ? '0' : '' ) + hexVal.toUpperCase();}x++;} } return output;}

container = document.createElement('div');
container.style.textAlign = 'center';
box = document.createElement('div');
box.style.backgroundColor = config['box_border'];
box.style.width = config['box_width']+'px';
box.style.height = config['box_height']+'px';
box.style.border = '1px solid '+ config['box_border'];
box.align = 'left';
iframe = document.createElement('iframe');
iframe.src = "http://www.lavozdemarbella.com/marquee/marquee.php?w="+config['box_width']+'&h='+config['box_height']+'&bg='+URLEncode(config['box_bg'])+'&c='+URLEncode(config['title_color']);
iframe.width = config['box_width']-2;
iframe.height = config['box_height']-20
iframe.frameBorder = 0;
iframe.scrolling = "no";
attribution  = document.createElement('div');
attribution.style.backgroundColor = config['box_border'];
attribution.style.height = '16px';
attribution.style.color = blackOrWhite(config['box_border']);
attribution.style.paddingLeft = '4px';
link  = document.createElement('a');
link.href="http://www.lavozdemarbella.com/";
link.target="_blank";
link.style.color = blackOrWhite(config['box_border']);
link.style.fontSize = '12pt';
link.style.fontFamily ='times new roman, arial';
link.title = 'Ir a www.lavozdemarbella.com';
link.style.textDecoration = 'none';
link.appendChild(document.createTextNode('LaVozdeMarbella.com'));
attribution.appendChild(link);
box.appendChild(iframe);
box.appendChild(attribution);
container.appendChild(box);
document.body.appendChild(container);