/*
+----------------------------------------------------------------+
|	WordPress Plugin: Shout Stream            								     |
|	http://deuced.net/shout-stream/        						             |
|	File Information:																	             |
|	- Shout Stream Javascript  POPUP window										     |
|	- wp-content/plugins/shout-stream/ss_popup.js                  |
+----------------------------------------------------------------+
*/
function ss_popup(divname,winName,features,curvalue) 
{ 
  w=window.open('',winName,features);
	w.document.write('<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>Popup Window</TITLE></HEAD>');
  var stream_array = new Array();
  stream_array = curvalue.split(' ');
  var ss_popupip = stream_array[1];
  var ss_popupport = stream_array[2];
  var ss_detect = stream_array[3];
  var ss_media_caster = stream_array[4];
  var ss_minipointurl = stream_array[5];
  var ss_minicaster_url = stream_array[6];
  var ss_minicasterurl = stream_array[7];
  var ss_type = stream_array[8];
  var ss_mountpoint = stream_array[9];
  var ss_streamname = "I.M.Red Trance Digital Radio Worldwide";
  var SS_media_player_URLtype = ss_popupip + ':' + ss_popupport + '/' + ss_mountpoint; 
	w.document.write('<BODY bgcolor="#000000" leftmargin="0" topmargin="15" link="#e8e8e8" vlink="#e8e8e8" alink="#e8e8e8">');
  w.document.write('<div style="text-align: center; line-height: 20px; color: #e8e8e8; text-decoration: none; letter-spacing: 0px; font-weight: bold; font-size: 10px; font-family: verdana;">' + ss_streamname +'</div>');
if (ss_detect == 0 && ss_media_caster == 2)
{
  w.document.write('<div style="text-align: center; height: 70px;">');  
	w.document.write('<object id="fmp256" type="application/x-shockwave-flash" data="' + ss_minipointurl + '/plugins/shout-stream/minicaster.swf" width="550" height="70" flashVars="config=' + ss_minicaster_url + 'minicaster.php%3Fminicasterurl%3D' + ss_minicasterurl + '" />');
	w.document.write('<param name="movie" value="' + ss_minipointurl + '/plugins/shout-stream/minicaster.swf" />');
	w.document.write('<param name="wmode" value="transparent" />');
	w.document.write('<param name="allowScriptAccess" value="sameDomain" />');
	w.document.write('<param name="flashVars" value="config=' + ss_minicaster_url + 'minicaster.php%3Fminicasterurl%3D' + ss_minicasterurl + '" />');
	w.document.write('</object>');
  w.document.write('</div>');  
}
else
{
  w.document.write('<div style="text-align: center;">');  
w.document.write('<embed src="http://www.shoutcast.com/popupplayer/popup_player_061809.swf" wmode="transparent" quality="high" bgcolor="#ffffff" name="popup_player" flashvars="hostLink=http://yp.shoutcast.com/Metadata_Info1.php&bool=1&url=http://yp.shoutcast.com/sbin/tunein-station.pls?id=1276091" allowscriptaccess="sameDomain" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="500" align="middle" height="103"/>');	
  w.document.write('</div>');  
}
  w.document.write('<div style="text-align: center; line-height: 20px; color: #e8e8e8; text-decoration: none; letter-spacing: 0px; font-weight: bold; font-size: 10px; font-family: verdana;"><a href="javascript:self.close()">Close Player</a></div>');
	w.document.write('</BODY></HTML>');
  w.document.close();  
}
/*
+--------------------------------------------------------------------------------+
| The following code was found @ DYNAMIC DRIVE                                   |
| Dynamic Ajax Content- © Dynamic Drive DHTML code library (www.dynamicdrive.com)|
| This notice MUST stay intact for legal use                                     |
| Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code       |
+--------------------------------------------------------------------------------+
*/
var bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)
var loadedobjects=""
var rootdomain="http://"+window.location.hostname
var bustcacheparameter=""
function ssajaxpage(url, containerid){
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
} 
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.onreadystatechange=function(){
loadpage(page_request, containerid)
}
if (bustcachevar) //if bust caching of external page
bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
page_request.open('GET', url+bustcacheparameter, true)
page_request.send(null)
}
function loadpage(page_request, containerid){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
document.getElementById(containerid).innerHTML=page_request.responseText

}
function loadobjs(){
if (!document.getElementById)
return
for (i=0; i<arguments.length; i++){
var file=arguments[i]
var fileref=""
if (fileref!=""){
document.getElementsByTagName("head").item(0).appendChild(fileref)
loadedobjects+=file+" " //Remember this object as being already added to page
}
}
}