// http://localhost/~jack/sandbox/004.htm?intro=322a90

function vxi_embed_intro_d() {
	//document.write("foo<br>\n");
	document.write("intro: " + vxi_intro + "<br clear='all'>\n");
	document.write("<iframe src='http://www.voxci.com/voxci_b.php?i=e679bd'>No iFrame</iframe><br clear=all>");
}

function vxi_embed_intro1() { 
	// Version 1
	// This is the code that displays the voxci widget (eg. vxi-free, vxi-pro)
	boxbgcolor = "#FFF8D0";
	boxbordercolor = "#FFA500";
	document.write("<div style='color:gray;font-size:10pt;background-color:"+boxbgcolor+"; border:1px "+boxbordercolor+" solid;padding:5px;width:400px;'>");
	document.write ("<iframe scrolling=no SRC='http://www.voxci.com/voxci_b.php?i=" + vxi_intro + "' frameborder=0 style='width:400px;height:200px;padding:0;margin:0;border:0px solid #FFA500;background:#FFF8D0;' TITLE=''>No iFrame</iframe><br clear=all>");
	document.write("</div>");
}

function vxi_embed_intro() { 
	// Version 2
	// This is the code that displays the voxci widget (eg. vxi-free, vxi-pro)
	boxbgcolor = "white";
	boxbordercolor = "#FFA500";
	document.write("<div style='font-size:10pt;background-color:"+boxbgcolor+"; border:1px "+boxbordercolor+" solid;padding:0;width:420px;'>");
	document.write ("<iframe scrolling=no SRC='http://www.voxci.com/voxci_d.php?i=" + vxi_intro + "' frameborder=0 style='width:420px;height:316px;padding:0;margin:0;background:white;' TITLE=''>No iFrame</iframe><br clear=all>");
	document.write("</div>");
}

function vxi_embed_intro_critdget() { 
	// Version 3 (critdget)
	// This is the code that displays the voxci widget (eg. vxi-free, vxi-pro)
	boxbgcolor = "white";
	boxbordercolor = "#FFA500";
	document.write("<div style='font-size:10pt;background-color:"+boxbgcolor+"; border:1px "+boxbordercolor+" solid;padding:0;width:460px;'>");
	document.write ("<iframe scrolling=no SRC='http://www.voxci.com/voxci_critt.php?i=" + vxi_intro + "' frameborder=0 style='width:460px;height:90px;padding:0;margin:0;background:white;' TITLE=''>No iFrame</iframe><br clear=all>");
	document.write("</div>");
}

function vxi_embed_recent() { 
	// Version 3 (critdget)
	// This is the code that displays the voxci widget (eg. vxi-free, vxi-pro)
	boxbgcolor = "white";
	boxbordercolor = "#FFA500";
	document.write("<div style='font-size:10pt;background-color:"+boxbgcolor+"; border:1px "+boxbordercolor+" solid;padding:0;width:460px;'>");
	document.write ("<iframe scrolling=no SRC='http://www.voxci.com/voxci_recent.php?a=" + vxi_acct + "' frameborder=0 style='width:460px;height:90px;padding:0;margin:0;background:white;' TITLE=''>No iFrame</iframe><br clear=all>");
	document.write("</div>");
}

function embedvoxci2() {
	// v. 2 of this func
	param = gup( "intro" );
	writeln("<IFRAME SRC='http://www.voxci.com/voxci_a.php?i="+param+"' style='border:1px solid #FFA500;background:#FFF8D0;' TITLE=''>No iFrame</iframe>");
}

function embedvoxci() {
	// v. 1 of this func
	boxbgcolor = "#FFF8D0";
	boxbordercolor = "#FFA500";
	document.write ("<div style='color:gray;font-size:10pt;background-color:"+boxbgcolor+"; border:1px "+boxbordercolor+" solid;padding:5px;'>");
	
	foobaz = document.location.href;
	foobazencoded = encodeURIComponent(foobaz);
	
	param = gup( "intro" );
	if(param) {
		writeln("<b>Voxci Voice Post</b>");
		writedougplayer(param);
	}
	
	writeln("<a href='http://www.voxci.com/record1.php?u="+foobazencoded+"&st="+_uacct+"'>Add your own voice</a> to this page.");
	document.write("<span style='font-size:80%;float:left;'><a href='http://www.voxci.com/'>What is this?</a></span>");
	writeln("<span style='font-size:80%;float:right;'>powered by <a href='http://www.voxci.com/'>HB</a>.</span>");
	writeln ("</div>");
}

function writedougplayer(i) {
	document.write ("<IFRAME scrolling=no SRC='http://www.voxci.com/voxci_a.php?i="+i+"' style='width:290px;height:30px;padding:0;margin:0;border:0px solid #FFA500;background:#FFF8D0;' TITLE=''></iframe><br clear=all>");
}

function gup( name )
// func src: http://www.netlobo.com/url_query_string_javascript.html
{
	var regexS = "[\\?&]"+name+"=([^&#]*)";
	var regex = new RegExp( regexS );
	var tmpURL = window.location.href;
	var results = regex.exec( tmpURL );
	if( results == null )
		return "";
	else
		return results[1];
}

function writeln (str) {
	document.write(str);
	document.write ("<br>");
}

function getintrourl (introcode) {
	var func_url = "http://www.voxci.com/getintrourl.php?intro="+introcode;
	writeln (func_url);

	var req = new XMLHttpRequest();
	req.open('GET', func_url, false); 
	req.send(null);
	if(req.status == 200)
	  dump(req.responseText);

	return "http://media.kindstream.com/vxml/audio/R_1-1175609024584.mp3";
}

function writedougplayer1(mp3url) {
	document.write ("<object type='application/x-shockwave-flash' data='http://media.kindstream.com/swf/doug_player.swf' width='290' height='24' id='audioplayer7480'><param name='movie' value='http://media.kindstream.com/swf/doug_player.swf' /><param name='FlashVars' value='playerID=7480&bg=0xF8F8F8&leftbg=0xEEEEEE&text=0x666666&lefticon=0x666666&rightbg=0xCCCCCC&rightbghover=0x999999&righticon=0x666666&righticonhover=0xFFFFFF&slider=0x666666&track=0xFFFFFF&loader=0x9FFFB8&border=0x666666&soundFile=" + mp3url + "&autostart=no' /><param name='quality' value='high' /><param name='menu' value='false' /><param name='wmode' value='transparent' /></object><br clear='all' />");
}

