if(typeof(_pc_widget_count) == 'undefined'){_pc_widget_count = 5;}
if(typeof(_pc_widget_width) == 'undefined'){_pc_widget_width =250;}else if(_pc_widget_width < 200){_pc_widget_width = 200}
if(typeof(_pc_widget_height) == 'undefined'){_pc_widget_height = 'auto'}else{_pc_widget_height = _pc_widget_height +'px'}
if(typeof(_pc_widget_background) == 'undefined'){_pc_widget_background = '#e4dfc9';}
if(typeof(_pc_widget_border_color) == 'undefined'){_pc_widget_border_color = '#d7d3b0';}
if(typeof(_pc_widget_font_color) == 'undefined'){_pc_widget_font_color = '#c8c8c8';}
if(typeof(_pc_widget_link_color) == 'undefined'){_pc_widget_link_color = '#3c3c3c';}
if(typeof(_pc_widget_post_backgound_color) == 'undefined'){_pc_widget_post_backgound_color = 'white';}
d = document;
u = 'http://pipes.yahoo.com/pipes/pipe.run?_id=4c77ccdd7df681620912631b26b6cb7c&_render=json&_callback=parseJSON';
d.write('<script src="'+u+'" type="text/javascript"></script>');

function parseJSON(jsonData)
{
	noi = jsonData.value.items.length;
	if(_pc_widget_count > noi){_pc_widget_count = noi;}
	inHtml = '';
	for(counter = 0; counter < _pc_widget_count; counter++)
	{
		inHtml += '<div class="_pc_widget_links" style="background:'+_pc_widget_post_backgound_color+';border-bottom:1px dotted '+_pc_widget_border_color+';padding:5px 5px 5px 5px;"><a target="_blank" style="text-decoration:none;color:'+_pc_widget_link_color+';" href="'+jsonData.value.items[counter].link+'">'+jsonData.value.items[counter].title+'</a></div>';
	}
	inHtml = '<div style="text-align:center"><a href="http://phpcamp.net" target="_blank"><img style="width:200px;height:79px;border:0px" src="http://files.phpcamp.net/images/logo.png"/></a></div><div style="font-family:\'lucida grande\',lucida,tahoma,helvetica,arial,sans-serif;font-size:12px;color:'+_pc_widget_font_color+';text-align:left">'+inHtml+'</div>';
	inHtml = inHtml+'<div style="font-family:\'lucida grande\',lucida,tahoma,helvetica,arial,sans-serif;font-size:12px;color:'+_pc_widget_font_color+';text-align:center;padding:5px 3px 5px 3px;"><a style="text-decoration:none;color:'+_pc_widget_link_color+';" href="http://phpcamp.net/camper" target="_blank">Powered by PHPCampers</a></div>';
	d.write('<div id="_pc_widget" style="height:'+_pc_widget_height+';width:'+_pc_widget_width+'px;background:'+_pc_widget_background+';border:1px solid '+_pc_widget_border_color+';">'+inHtml+'</div>');	
}
