
	var myDomain = document.domain;
	
	function go_to_location1()
	{
	 		var list=document.forms[0].categoryList;
	 		location=list.options[list.selectedIndex].value;
	}
	
	function go_to_location2()
	{
	 		var list=document.forms[0].videoStateList;
	 		location=list.options[list.selectedIndex].value;
	}
	
	function go_to_location3()
	{
	 		var list=document.forms[0].entityList;
	 		location=list.options[list.selectedIndex].value;
	}
	
	function chgSrc(imgObj, newSrc){
		imgObj.src = newSrc;
	}

	var currentPosition;
	var currentVolume;

	function sendEvent(typ,prm) {
		thisMovie("flvplayer").sendEvent(typ,prm);
	};

	function loadFile(fil,tit,lnk,img,fid) {
		thisMovie("flvplayer").loadFile(fil,tit,lnk,img,fid);
	};

	function thisMovie(movieName) {
	    if(navigator.appName.indexOf("Microsoft") != -1) {
			return window[movieName];
		} else {
			return document[movieName];
		}
	};

	function getUpdate(typ,pr1,pr2) {
//		if(typ == "item") { alert(pr1);alert(pr2); }

		if(typ == "time") { currentPosition = pr1; }
		else if(typ == "volume") { currentVolume = pr1; }
		var id = document.getElementById(typ);
		id.innerHTML = typ+ ": "+Math.round(pr1);
		pr2 == undefined ? null: id.innerHTML += ", "+Math.round(pr2);
	};

	function getItemData(idx) {
		var obj = thisMovie("mpl").itemData(idx);
		var nodes = "";
		for(var i in obj) { 
			nodes += "<li>"+i+": "+obj[i]+"</li>"; 
		}
		document.getElementById("myDiv").innerHTML = nodes;
	};

	function itemData(obj) {
		var nodes = "";
		var strEmb = "";	
		for(var i in obj) { 
			nodes += "<li>"+i+": "+obj[i]+"</li>"; 
		//	alert(i);
	
				if (i=='author') { 
					if (document.getElementById("thisauthor") != null) {
						document.getElementById("thisauthor").innerHTML = obj[i];
					}
				
				}

				if (i=='title') {
					if (document.getElementById("thistitle") != null) {
					document.getElementById("thistitle").innerHTML = replaceThis(obj[i]); 
					}

				
				}
				if (i=='image') {
					if (document.getElementById("thisVImage") != null) {
						thisImage=document.getElementById('thisVImage');
						thisImage.src=obj[i];
					}
				}
				if (i=='id') {
					if (document.getElementById("thisLink") != null) {
						var mySplitResult = obj[i].split("|");
						chID=mySplitResult[2]
						thisInput=document.getElementById('thisLink');
						tempVar=thisInput.innerHTML;
						thisInput.innerHTML='<a href=/scid/remCh/default.asp?channelID='+chID+'><img src="images/linkTochannel.jpg" width="54" height="32" border="0"></a>';
					}


					if (document.getElementById("remVideoVal") != null) {
						thisInput=document.getElementById('remVideoVal');
						thisInput.value=obj[i];
					}

					if (document.getElementById("remVideoURL") != null) {
						thisInput=document.getElementById('remVideoURL');
						thisInput.value='http://'+myDomain+'/scid/remCh?refID='+obj[i];
					}
					if (document.getElementById("remVideoEmb") != null) {
						strEmb='<embed src="http://'+myDomain+'/scid/remCh/emb/flvplayer.swf"  wmode="transparent" width="400" height="325" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="file=http://'+myDomain+'/scid/remCh/emb/videoFeedRem.asp%3FremID='+obj[i]+'&autostart=false&showdigits=false&callback=saveStatsToFile.asp&enablejs=true&shuffle=false&repeat=list&thumbsinplaylist=true&linkfromdisplay=true&transition=fade&overstretch=fit&logo=http://'+myDomain+'/xFiles/scVideoDeployer/images/channelImage.gif" ></embed>';
						thisInput=document.getElementById('remVideoEmb');
						thisInput.value=strEmb;
					}

					if (document.getElementById("remVideoSCP") != null) {
						strEmb='<script type="text/javascript"> _h5db4="'+obj[i]+'";_myStr="<img src=http://'+myDomain+'/scid/remCh/images/camera.gif border=0 />";</script> <script src="http://'+myDomain+'/scid/webcastter/emb/remoteSrc.js" type="text/javascript"></script>';
						thisInput=document.getElementById('remVideoSCP');
						thisInput.value=strEmb;
					}

					if (document.getElementById("addToCha") != null) {
						thisInput=document.getElementById('addToCha');
						thisInput.href='javascript:loadThisAdd("'+ obj[i]+'","section2","8");my_slider.last();' ;
					}

					if (document.getElementById("addToFav") != null) {
						thisInput=document.getElementById('addToFav');
						thisInput.href='javascript:loadThisAdd("'+ obj[i]+'","section2","9");my_slider.last();' ;
					}

					if (document.getElementById("addToHgh") != null) {
						thisInput=document.getElementById('addToHgh');
						thisInput.href='javascript:loadThisAdd("'+ obj[i]+'","section2","10");my_slider.last();' ;
					}

					if (document.getElementById("addToImp") != null) {
						thisInput=document.getElementById('addToImp');
						thisInput.href='javascript:loadThisAdd("'+ obj[i]+'","section2","11");my_slider.last();' ;
					}

					if (document.getElementById("addToExp") != null) {
						thisInput=document.getElementById('addToExp');
						thisInput.href='javascript:loadThisAdd("'+ obj[i]+'","section2","12");my_slider.last();' ;
					}


				}

		}

	};

	var tempVideoVal='2';
 
	function getVideoVal(){
		return document.getElementById('remVideoVal').value;
	};
	function subVals(tempVal) {
		var aa=getVideoVal();
		if (tempVal==2){  // tipo img
			strEmb=' <script type="text/javascript"> _h5db4="'+aa+'";_myStr="<img src=http://'+myDomain+'/scid/webcastter/images/camera.gif border=0 />"; </script>';
		}
		else {  // tipo text
			strEmb='  <script type="text/javascript">_h5db4="'+aa+'";_myStr="'+tempVal+'";</script>';
		}
		strEmb=strEmb + '<script src="http://'+myDomain+'/scid/webcastter/emb/remoteSrc.js" type="text/javascript"></script>';
		thisInput=document.getElementById('remVideoSCP');
		thisInput.value=strEmb;
		thisInput.select();


	};

	function replaceThis(srtInput){
		srtInput.replace(/À/g, "&Agrave;")
		srtInput.replace(/Á/g, "&Aacute;")
		srtInput.replace(/à/g, "&agrave;")
		srtInput.replace(/á/g, "&aacute;")
		srtInput.replace(/Ã/g, "&Atilde;")
		srtInput.replace(/ã/g, "&atilde;")
		srtInput.replace(/â/g, "&acirc;")
		srtInput.replace(/Â/g, "&Acirc;")
				
		srtInput.replace(/È/g, "&Egrave;")
		srtInput.replace(/É/g, "&Eacute;")
		srtInput.replace(/è/g, "&egrave;")
		srtInput.replace(/é/g, "&eacute;")
		srtInput.replace(/Ê/g, "&Ecirc;")
		srtInput.replace(/ê/g, "&ecirc;")
				
		srtInput.replace(/í/g, "&iacute;")
		srtInput.replace(/Í/g, "&Iacute;")
				
		srtInput.replace(/ó/g, "&oacute;")
		srtInput.replace(/Ó/g, "&Oacute;")
		
		srtInput.replace(/Ô/g, "&Ocirc;")
		srtInput.replace(/ô/g, "&ocirc;")
		srtInput.replace(/Õ/g, "&Otilde;")
		srtInput.replace(/õ/g, "&otilde;")
				
		srtInput.replace(/ç/g, "&#231;")
		srtInput.replace(/Ç/g, "&#199;")
				
		srtInput.replace(/Ú/g, "&Uacute;")
		srtInput.replace(/ú/g, "&ugrave;")
		srtInput.replace(/Ù/g, "&Ugrave;")
		srtInput.replace(/ù/g, "&ugrave;")


		return srtInput
	
	}