// JavaScript Document


var urlthistime = "http://www.b2reel.com/web/";


function deleteMediaVideo(na)
{
	
var al = confirm  ("Are you sure?")
if (al)
top.location.href="_script/deletevideo.php?todel="+ na ;
//top.location.href="mymedia.php?allesklar=ok";
else
top.location.href="mymedia.php";
	//_script/deletevideo.php?todel=".$code."
	
}



function deleteMediaStill(nas)
{
	
var als = confirm  ("Are you sure?")
if (als)
top.location.href="_script/deletestill.php?todel="+ nas ;
//top.location.href="mymedia.php?allesklar=ok";
else
top.location.href="mymediastill.php?nas="+ nas;
	//_script/deletevideo.php?todel=".$code."
	
}



function deleteMediaAudio(naa)
{
	//alert("hallo");
var als = confirm  ("Are you sure?")
if (als)
top.location.href="_script/deletestaudio.php?todel="+ naa ;
//top.location.href="mymedia.php?allesklar=ok";
else
top.location.href="mymediaaudio.php?naa="+ naa;
	//_script/deletevideo.php?todel=".$code."
	
}




function getFavVideo(share)
{
	
	
		top.location.href="index.php?preciousreel_id=" + share;
		
		
		
	//var vid = "<object width='580' height='327'><param name='allowfullscreen' value='true' /><param name='allowscriptaccess' value='always' /><param name='movie' value='mediareel_advanced.swf?preciousreel_id=" + share +"'" + "/><embed src='mediareel_advanced.swf?preciousreel_id=" + share + "'" + " type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always'width='380' height='327'></embed></object>" ;

//var test = document.getElementsByName("movie")[0].value ;
//alert(vid);
//document.span2.span1.value = vid;
	

	
	
	
}



function getProfileVideo(overgabe)
{
	
	
		var ausgabe = overgabe.split("aspect")
		var share = ausgabe[0];
		var height = ausgabe[1];
		var heightnew = parseInt(height) + parseInt(3);
		//alert(heightnew);
		
		
		
	var vid = " <div class='videowallleft' style= height:"+heightnew+" value='test'><object width='580' height='"+height+"'><param name='allowfullscreen' value='true' /><param name='allowscriptaccess' value='always' /><param name='movie' value='mediareel_advanced.swf?preciousreel_id=" + share +"'" + "/><embed src='mediareel_advanced.swf?preciousreel_id=" + share + "'" + " type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always'width='580' height='"+height+"'></embed></object><div>" ;

//var test = document.getElementsByName("movie")[0].value ;
//alert(document.getElementsByName("vidcode")[0].innerHTML);
//alert(share);
document.getElementsByName("vidcode")[0].innerHTML = vid;
	
videoInfo(share);
	
	
	
}




function getProfileAudio(share)
{
	
	
	
		
		
		
		
	var vid = " <div class='audiowallleft'><object width='454' height='100'><param name='allowfullscreen' value='true' /><param name='allowscriptaccess' value='always' /><param name='movie' value='B2Reel_audioplayer_single.swf?preciousreel_id=" + share +"'" + "/><embed src='B2Reel_audioplayer_single.swf?preciousreel_id=" + share + "'" + " type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always'width='454' height='100'></embed></object><div>" ;

//var test = document.getElementsByName("movie")[0].value ;
//alert(document.getElementsByName("vidcode")[0].innerHTML);
//alert(share);
document.getElementsByName("vidcode")[0].innerHTML = vid;
	

	audioInfo(share);
	
	
}



function getProfileStill(share)
{
	
	var ausgabe = share.split("x-plo-de")
		var src = ausgabe[0];
		var user = ausgabe[1];
		
		
		String.prototype.replaceAll = function(pcFrom, pcTo){
    	var c = this;
    	while (c.indexOf(pcFrom) > -1)
        c = c.replace(pcFrom, pcTo); 
    	return c;
};




	var newstring = src.replaceAll ('b2reelfantasticcode', ' '); 
		
		
		
		
	var vid = " <div class='stillwallleft'> <img src='b2reelusers/"+user+"/videos/"+newstring+"' width ='590'/> <div>" ;

//var test = document.getElementsByName("movie")[0].value ;
//alert(document.getElementsByName("vidcode")[0].innerHTML);
//alert(share);
document.getElementsByName("vidcode")[0].innerHTML = vid;

stillInfo(newstring, user);
	

	
	
	
}








function akthome()
{
	
	
		top.location.href='../web/index.php?preciousreel_id=b4efb36c8b1d956291228ab0a9c8e1dc';
		
		
		
	
	
	
	
}




//// INFO FÜR DIE EINZELNEN STILLS HOLEN:



  <!--    
              var req = null;
              
             function handleTranslation(){            
                switch(req.readyState) {
                    case 4:
                        if(req.status!=200) {
                            alert("Fehler:"+req.status); 
                        }else{    
                            //felder des formulars
                            german_field = document.getElementById("infoco");
							commfield = document.getElementById("commdiv");
							linkfield = document.getElementById("linkdiv");
                            //-----french_field = document.getElementById("french");
                         
                            //antwort des servers
                            xml = req.responseXML;
							//alert(xml);
                            german_resp = xml.getElementsByTagName("english")[0];
							link_respx = xml.getElementsByTagName("link")[0];
                            //-----french_resp = xml.getElementsByTagName("french")[0];
                           comm_respx = xml.getElementsByTagName("comm")[0];
                            //schreiben des ergebnisses
                            inf = german_resp.firstChild.nodeValue;
							comminf = comm_respx.firstChild.nodeValue;
							linkinf = link_respx.firstChild.nodeValue;
							//alert(german_resp.firstChild.nodeValue);
                            //-----french_field.value = french_resp.firstChild.nodeValue;
							
								
								
								document.getElementsByName("infoload")[0].innerHTML = german_resp.firstChild.nodeValue;
								
								
								
								String.prototype.replaceAll = function(pcFrom, pcTo){
											var yy = this;
											while (yy.indexOf(pcFrom) > -1)
											yy = yy.replace(pcFrom, pcTo); 
											return yy;
									};
									
									
									String.prototype.replaceAllfinal = function(pcFrom, pcTo){
											var yy = this;
											while (yy.indexOf(pcFrom) > -1)
											yy = yy.replace(pcFrom, pcTo); 
											return yy;
									};



								


								var ausgabe = comminf.replaceAll ('[', '<');
								var ausgabefinal = ausgabe.replaceAllfinal (']', '>');
								
								var linkrep = linkinf.replaceAll ('[', '<');
								var linkrepfinal = linkrep.replaceAllfinal (']', '>');
								
						// WICHTIG ---alert(ausgabefinal);
								
								document.getElementsByName("commnamediv")[0].innerHTML = ausgabefinal;
								document.getElementsByName("linkcommdiv")[0].innerHTML = linkrepfinal;
						
							
                        }
                    break;
            
                    default:
                        return false;
                    break;     
                }
            }
            
             function stillInfo(vary,fuse){         
                 //erstellen des requests
				
                 
                try{
                    req = new XMLHttpRequest();
					
                }
                catch (e){
                    try{
                        req = new ActiveXObject("Msxml2.XMLHTTP");
                    } 
                    catch (e){
                        try{
                            req = new ActiveXObject("Microsoft.XMLHTTP");
                        } 
                        catch (failed){
                            req = null;
                        }
                    }  
                }

                if (req == null){
                      alert("Error creating request object!");
				}
				else{
					
				
				
                  
                  //anfrage erstellen (GET, url ist localhost,
                  //request ist asynchron      
                  var url = urlthistime+'_script/getinfostill.php?plot='+ vary +'&use='+ fuse;
				
                  req.open("GET", url, true);
}
                //Beim abschliessen des request wird diese Funktion ausgeführt
                req.onreadystatechange = handleTranslation;
  
                  req.setRequestHeader("Content-Type",
                                      "application/x-www-form-urlencoded");
                req.send(null);
            }
         //-->






//// INFO FÜR DIE EINZELNEN VIDEO HOLEN:



  <!--    
              var req = null;
              
             function handleTranslationvideo(){            
                switch(req.readyState) {
                    case 4:
                        if(req.status!=200) {
                            alert("Fehler:"+req.status); 
                        }else{    
                            //felder des formulars
                            german_fieldx = document.getElementById("infocovideo");
							commfield = document.getElementById("commdiv");
							linkfield = document.getElementById("linkdiv");
                            //-----french_field = document.getElementById("french");
                        
                            //antwort des servers
                            xml = req.responseXML;
							//alert(xml);
                            german_respx = xml.getElementsByTagName("english")[0];
							comm_respx = xml.getElementsByTagName("comm")[0];
								link_respx = xml.getElementsByTagName("link")[0];
                            //-----french_resp = xml.getElementsByTagName("french")[0];
                           
                            //schreiben des ergebnisses
                            inf = german_respx.firstChild.nodeValue;
							comminf = comm_respx.firstChild.nodeValue;
							linkinf = link_respx.firstChild.nodeValue;
							//alert(german_resp.firstChild.nodeValue);
                            //-----french_field.value = french_resp.firstChild.nodeValue;
							// WICHTIG --- alert(comm_respx.firstChild.nodeValue);
								
								
								document.getElementsByName("infoloadvideo")[0].innerHTML = german_respx.firstChild.nodeValue;
								
								
								String.prototype.replaceAll = function(pcFrom, pcTo){
											var yy = this;
											while (yy.indexOf(pcFrom) > -1)
											yy = yy.replace(pcFrom, pcTo); 
											return yy;
									};
									
									
									String.prototype.replaceAllfinal = function(pcFrom, pcTo){
											var yy = this;
											while (yy.indexOf(pcFrom) > -1)
											yy = yy.replace(pcFrom, pcTo); 
											return yy;
									};
									
									




								var ausgabe = comminf.replaceAll ('[', '<');
								var ausgabefinal = ausgabe.replaceAllfinal (']', '>');
								
								
								var linkrep = linkinf.replaceAll ('[', '<');
								var linkrepfinal = linkrep.replaceAllfinal (']', '>');
								
								
								
						// WICHTIG ---alert(ausgabefinal);
								
								document.getElementsByName("commnamediv")[0].innerHTML = ausgabefinal;
								document.getElementsByName("linkcommdiv")[0].innerHTML = linkrepfinal;
						
							
                        }
                    break;
            
                    default:
                        return false;
                    break;     
                }
            }
            
             function videoInfo(vary){         
                 //erstellen des requests
				
                 
                try{
                    req = new XMLHttpRequest();
					
                }
                catch (e){
                    try{
                        req = new ActiveXObject("Msxml2.XMLHTTP");
                    } 
                    catch (e){
                        try{
                            req = new ActiveXObject("Microsoft.XMLHTTP");
                        } 
                        catch (failed){
                            req = null;
                        }
                    }  
                }

                if (req == null){
                      alert("Error creating request object!");
				}
				else{
					
				
				
                  
                  //anfrage erstellen (GET, url ist localhost,
                  //request ist asynchron      
                  var url = urlthistime+'_script/getinfovideo.php?plot='+ vary;
				
                  req.open("GET", url, true);
}
                //Beim abschliessen des request wird diese Funktion ausgeführt
                req.onreadystatechange = handleTranslationvideo;
  					
                  req.setRequestHeader("Content-Type",
                                      "application/x-www-form-urlencoded");
                req.send(null);
            }
         //-->







//// INFO FÜR DIE EINZELNEN AUDIO HOLEN:



  <!--    
              var req = null;
              
             function handleTranslationaudio(){            
                switch(req.readyState) {
                    case 4:
                        if(req.status!=200) {
                            alert("Fehler:"+req.status); 
                        }else{    
                            //felder des formulars
                            german_field = document.getElementById("infocoaudio");
							commfield = document.getElementById("commdiv");
							linkfield = document.getElementById("linkdiv");
							
                            //-----french_field = document.getElementById("french");
                         
                            //antwort des servers
                            xml = req.responseXML;
							//alert(xml);
                            german_resp = xml.getElementsByTagName("english")[0];
							link_respx = xml.getElementsByTagName("link")[0];
                            //-----french_resp = xml.getElementsByTagName("french")[0];
                           comm_respx = xml.getElementsByTagName("comm")[0];
                            //schreiben des ergebnisses
                            inf = german_resp.firstChild.nodeValue;
							comminf = comm_respx.firstChild.nodeValue;
							linkinf = link_respx.firstChild.nodeValue;
							//alert(german_resp.firstChild.nodeValue);
                            //-----french_field.value = french_resp.firstChild.nodeValue;
							
								
								
								document.getElementsByName("infoloadaudio")[0].innerHTML = german_resp.firstChild.nodeValue;
								
								
								
								
								String.prototype.replaceAll = function(pcFrom, pcTo){
											var yy = this;
											while (yy.indexOf(pcFrom) > -1)
											yy = yy.replace(pcFrom, pcTo); 
											return yy;
									};
									
									
									String.prototype.replaceAllfinal = function(pcFrom, pcTo){
											var yy = this;
											while (yy.indexOf(pcFrom) > -1)
											yy = yy.replace(pcFrom, pcTo); 
											return yy;
									};




								var ausgabe = comminf.replaceAll ('[', '<');
								var ausgabefinal = ausgabe.replaceAllfinal (']', '>');
								
								
								var linkrep = linkinf.replaceAll ('[', '<');
								var linkrepfinal = linkrep.replaceAllfinal (']', '>');
								
								
						// WICHTIG ---alert(ausgabefinal);
								
								document.getElementsByName("commnamediv")[0].innerHTML = ausgabefinal;
								document.getElementsByName("linkcommdiv")[0].innerHTML = linkrepfinal;
						
							
                        }
                    break;
            
                    default:
                        return false;
                    break;     
                }
            }
            
             function audioInfo(vary){         
                 //erstellen des requests
				
                 
                try{
                    req = new XMLHttpRequest();
					
                }
                catch (e){
                    try{
                        req = new ActiveXObject("Msxml2.XMLHTTP");
                    } 
                    catch (e){
                        try{
                            req = new ActiveXObject("Microsoft.XMLHTTP");
                        } 
                        catch (failed){
                            req = null;
                        }
                    }  
                }

                if (req == null){
                      alert("Error creating request object!");
				}
				else{
					
				
				
                  
                  //anfrage erstellen (GET, url ist localhost,
                  //request ist asynchron      
                  var url = urlthistime+'_script/getinfoaudio.php?plot='+ vary;
				
                  req.open("GET", url, true);
}
                //Beim abschliessen des request wird diese Funktion ausgeführt
                req.onreadystatechange = handleTranslationaudio;
  
                  req.setRequestHeader("Content-Type",
                                      "application/x-www-form-urlencoded");
                req.send(null);
            }
         //-->




/*window.onload=recBrow; 




function recBrow(){
	
	 // alert("IE");
//document.write('<align="center"><font face="Verdana" size="2"><b>');
//document.write('Sie benutzen ');
if (navigator.appName.indexOf("Internet Explorer") != -1)

{
	
	
	
	if (navigator.appVersion.indexOf("6") != -1)
{
	window.location = "http://www.b2reel.com/web/404.html";
	}
	
	if (navigator.appVersion.indexOf("7") != -1)
{
	window.location = "http://www.b2reel.com/web/404.html";
	}
	if (navigator.appVersion.indexOf("8") != -1)
{
	window.location = "http://www.b2reel.com/web/404.html";
	}
	window.location = "http://www.b2reel.com/web/404.html";
	}
	
	
	
	
	
else if (navigator.userAgent.indexOf("Netscape") != -1)
{
   refer = "netscapelink.html";
   document.write('Netscape Navigator');
}
else if (navigator.appName.indexOf("Internet Explorer") != -1)
{
   refer = "msielink.html";
   document.write('Internet Explorer');
}
else if (navigator.userAgent.indexOf("Firefox") != -1)
{
   refer = "firefox.html";
   document.write('Mozilla Firefox');
}
else
{
   refer = "unbekannt.html";
   document.write('Unbekannter Browser');
}
//an dieser Stelle könnte entsprechend umgeleitet werden:
//window.location = refer;
}*/









