function load(type) {
	var parent_url=encodeURI(window.parent.location);
	var url;
	var width;
	var height;
	
	// Validate Input
	if (!type) type = 'narrow';
	
	// Set Widget URL
	if (type == 'narrow') {
		url = 'http://www.connectamillionminds.com/widget.php?t=thin';
		width = '160';
		height = '433';
	} else if (type == 'wide') {
		url = 'http://www.connectamillionminds.com/widget.php?t=wide';
		width = '300';
		height = '378';
	}
	
	// Test for target
	if (!document.getElementById('camm_widget')) {
		alert('CAMM Widget: Your widget code appears to be broken.');
		return false;
	}
	
	var div = document.getElementById('camm_widget');
	var iframe = document.createElement('iframe');
	iframe.setAttribute('name','camm_iframe');
	iframe.setAttribute('src',url+"&parent_url="+parent_url);
	iframe.setAttribute('width',width);
	iframe.setAttribute('height',height);
	iframe.setAttribute('scrolling','no');
	iframe.setAttribute('style','margin: 0; padding: 0; border: 1px solid #dbdbdb; overflow: hidden;');
	iframe.setAttribute('longdesc',parent_url);
	div.appendChild(iframe);
}

load(camm_widget_type);