/* The following function creates an XMLHttpRequest object... */
var elementId="";
var loadingMesg="";
var elementSelected=""; 
function createRequestObject(){
        var request_o; //declare the variable to hold the object.
        var browser = navigator.appName; //find the browser name
        if(browser == "Microsoft Internet Explorer"){
                /* Create the object using MSIE's method */
                request_o = new ActiveXObject("Microsoft.XMLHTTP");
        }else{
                /* Create the object using other browser's method */
                request_o = new XMLHttpRequest();
        }
        return request_o; //return the object
}

var http = createRequestObject();

function getRequest2(url,id,selectedId){

	
        /* Create the request. The first argument to the open function is the method (POST/GET),
                and the second argument is the url... 
                document contains references to all items on the page
                We can reference document.form_category_select.select_category_select and we will
                be referencing the dropdown list. The selectedIndex property will give us the 
                index of the selected item. 
        */
        elementId=id;
		
        http.open('get', url);
      
		
		/* Define a function to call once a response has been received. This will be our
                handleProductCategories function that we define below. */
        http.onreadystatechange = ManipulateRequest2; 
        /* Send the data. We use something other than null when we are sending using the POST
                method. */
        http.send(null);
}

function ManipulateRequest2(){
        /* Make sure that the transaction has finished. The XMLHttpRequest object 
                has a property called readyState with several states:
                0: Uninitialized
                1: Loading
                2: Loaded
                3: Interactive
                4: Finished */

//        if(loadingMesg=="") var msg="Please wait ... loading";
//                else msg=loadingMesg;
//draw the combo
        var elementIdArray = elementId.split("^");
		if(http.readyState == 1)
        {		
				 document.getElementById(elementIdArray[0]).innerHTML ="Please wait...";
				                   
		}else if(http.readyState == 4){ //Finished loading the response
                /* We have got the response from the server-side script,
                        let's see just what it was. using the responseText property of 
                        the XMLHttpRequest object. */
                var response = http.responseText;
                /* And now we want to change the product_categories <div> content.
                        we do this using an ability to get/change the content of a page element 
                        that we can find: innerHTML. */
              
               
				//alert ( " respomnse = "+response );

                var responseArray = response.split("~");				
				
						

				if(elementIdArray[0]=='mFeaturedPhoto'){
					p=responseArray[6]+responseArray[2];
					document.getElementById(elementIdArray[0]).innerHTML="<a href='comment/photo_comment.php?id="+responseArray[0]+"' ><img src='"+p+"' class='rFeatured_ImgBor' border='0'></a>";
					document.getElementById(elementIdArray[1]).innerHTML="<a href='members/memberProfile.php?memberId="+responseArray[1]+"' id='Name'>"+responseArray[4]+"</a><br>By:&nbsp;<a href='members/memberProfile.php?memberId="+responseArray[1]+"' class='rFeaturedBlueLink'>"+responseArray[3]+"</a><br>Tags: <a href='#' class='rFeaturedBlueLink' >"+responseArray[5]+"</a>";
				}else if(elementIdArray[0]=='mFeaturedVideo'){
					var imagePath=responseArray[6].replace(".flv",".jpg");
				
					document.getElementById(elementIdArray[0]).innerHTML="<a name=1><DIV class=video_big><DIV class=video_big><a href='comment/comment_video.php?id="+responseArray[0]+"'><img src='"+imagePath+"' border='0'></a><a href='#video' onclick=PlayVideo(this,'"+responseArray[7]+"','"+responseArray[6]+"','featured')><img src='images/play_button.gif' class='overlay_button' border='0'></a></div></div>";
					document.getElementById(elementIdArray[1]).innerHTML="<a href='members/memberProfile.php?memberId="+responseArray[1]+"' id='Name'>"+responseArray[4]+"</a><br>By:&nbsp;<a href='members/memberProfile.php?memberId="+responseArray[1]+"' class='rFeaturedBlueLink'>"+responseArray[3]+"</a><br>Tags: <a href='#' class='rFeaturedBlueLink' >"+responseArray[5]+"</a>";
				
				}else if(elementIdArray[0]=='mFeaturedArtistVideo'){

					var imagePath=responseArray[6].replace(".flv",".jpg");				
					document.getElementById(elementIdArray[0]).innerHTML="<a name=1><DIV class=video_big><DIV class=video_big><a href='comment/comment_video.php?id="+responseArray[0]+"'><img src='"+imagePath+"' border='0'></a><a href='#video' onclick=PlayVideo(this,'"+responseArray[7]+"','"+responseArray[6]+"','featured')><img src='images/play_button.gif' class='overlay_button' border='0'></a></div></div>";
					document.getElementById(elementIdArray[1]).innerHTML="<a href='members/memberProfile.php?memberId="+responseArray[1]+"' id='Name'>"+responseArray[4]+"</a>";
				
				}
				else if(elementIdArray[0]=='mStarCamArtistVideo'){
					
							var imagePath = responseArray[2].replace(".flv",".jpg");							
				    	document.getElementById(elementIdArray[0]).innerHTML="<a name=1><DIV class=video_big><DIV class=video_big><a href='#'><img src='"+imagePath+"' border='0'></a><a href='#video' onclick=PlayVideo(this,'"+responseArray[3]+"','"+responseArray[2]+"','')><img src='images/play_button.gif' class='overlay_button' border='0'></a></div></div>";
						document.getElementById(elementIdArray[1]).innerHTML="<a href='javascript:onclick=nextStarCamArtistVideo("+responseArray[0]+")' onMouseOut='MM_swapImgRestore()' onMouseOver=MM_swapImage('Image7','','images/mFeaturedArtist_Bt_Prev_hover.gif',1)><img src='images/mFeaturedArtist_Bt_Prev.gif' name='Image7' width='25' height='19' border='0'></a>";
					document.getElementById(elementIdArray[2]).innerHTML="<a href='javascript:onclick=nextStarCamArtistVideo("+responseArray[1]+")' onMouseOut='MM_swapImgRestore()' onMouseOver=MM_swapImage('Image8','','images/mFeaturedArtist_Bt_Nxt_hover.gif',1)><img src='images/mFeaturedArtist_Bt_Nxt.gif' name='Image8' width='24' height='19' border='0'></a>";
					 

				
				}

        }

}


//==========================Function to return response===============


//***************************** Flash Player ************
function PlayFeaturedVideo(element,docPath,fileName){
			var imagePath=fileName.replace(".flv",".jpg");
			
			var videocode="<div id='flash_video'><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='168' height='118' id='' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='movie' value='"+docPath+"/flash/flvPlayer_middle.swf?flvPath="+fileName+"&imagePath="+imagePath+"' /><param name='quality' value='high' /><param name='bgcolor' value='#ffffff' /><embed src='"+docPath+"/flash/flvPlayer_middle.swf?flvPath="+fileName+"&imagePath="+imagePath+"' quality='high' bgcolor='#ffffff' width='168' height='118' name='' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object></div>";
		
			var newElement = document.createElement('div');
			newElement.innerHTML = videocode;
			//alert(element.parentNode)
			setChildVisibilityWithNodeName(element.parentNode, "A", false);
			element.parentNode.appendChild(newElement);

			return false;
	
	}

	function MintkamPlayer(id,docPath,fileid,plyerid,sessid){
			
				document.getElementById(id).innerHTML="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' id='player' width='197' height='298' align='middle'><param name='wmode' value='transparent'><param name='allowScriptAccess' value='always' /><param name='movie' value='"+docPath+"/flash/player.swf?id="+fileid+"&PlayerId="+plyerid+"&phpsessid="+sessid+"' /><param name='quality' value='high' /><param name='bgcolor' value='#ffffff' /><embed src='"+docPath+"/flash/player.swf?id="+fileid+"&PlayerId="+plyerid+"&phpsessid="+sessid+"' quality='high' bgcolor='#ffffff' width='197' height='298' swLiveConnect=true id='player' name='player' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object>";			
				
	}
	
	function MintkamHellPlayerProfile(id,docPath,fileid,plyerid,sid){
			
				document.getElementById(id).innerHTML="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' id='player' width='400' height='400' align='middle'><param name='wmode' value='transparent'><param name='allowScriptAccess' value='always' /><param name='movie' value='"+docPath+"/flash/hellPlayer.swf?id="+fileid+"&PlayerId="+plyerid+"&sid="+sid+"' /><param name='quality' value='high' /><param name='bgcolor' value='#ffffff' /><embed src='"+docPath+"/flash/hellPlayer.swf?id="+fileid+"&PlayerId="+plyerid+"&sid="+sid+"' quality='high' bgcolor='#ffffff' width='400' height='400' swLiveConnect=true id='player' name='player' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object>";			
				
	}
	
	//workaround for the ActiveX issue in IE
	/* function embedFlash(embedString)
	{
		//echo the string into the page
		document.write(embedString);
	}*/
			
	
	function MintkamPlayerProfile(id,docPath,fileid,plyerid,sid,sessid,membertype){
		
		
			var strPlayer = "player.swf";

			/*var strWidth = "590";
			var strHeight = "255";*/
			var strWidth = "388";
			var strHeight = "255";
			/*if ( fileid == "1730" || fileid == "19" || fileid == "32" || fileid == "2730" || fileid == "4016" || fileid == "1871" )
			/*var strWidth = "590";
			var strHeight = "255";*/
			var strWidth = "388";
			var strHeight = "478";
			/*if ( fileid == "1730" || fileid == "19" || fileid == "32" || fileid == "2730" || fileid == "4016" || fileid == "1871" )

			{
				strPlayer = "playernew.swf";				
				strWidth = "396";
				strHeight = "517";
			}*/
			if ( fileid == "7134" )
			{
				strPlayer = "ShaqPlayer.swf";
				strWidth = "396";
				strHeight = "662";
			}

			
			if ( fileid == "1730" )
			{
				strPlayer = "comedy.swf";
				strWidth = "456";
				strHeight = "692";
			}
			if ( fileid == "32" )
			{
				strPlayer = "army.swf";
				strWidth = "456";
				strHeight = "692";
			}
			if ( fileid == "19" )
			{
				strPlayer = "player_19.swf";
				strWidth = "412";
				strHeight = "621";
			}
		document.getElementById(id).innerHTML="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' id='player' width='"+strWidth+"' height='"+strHeight+"' align='middle'><param name='allowFullScreen' value='true' /><param name='wmode' value='transparent'><param name='allowScriptAccess' value='always' /><param name='movie' value='"+docPath+"/flash/"+strPlayer+"?id="+fileid+"&PlayerId="+plyerid+"&sid="+sid+"&phpsessid="+sessid+"&UserType="+membertype+"' /><param name='quality' value='high' /><embed src='"+docPath+"/flash/"+strPlayer+"?id="+fileid+"&PlayerId="+plyerid+"&sid="+sid+"&phpsessid="+sessid+"&UserType="+membertype+"' quality='high' width='"+strWidth+"' height='"+strHeight+"' swLiveConnect=true id='player' name='player' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='transparent' allowFullScreen='true'/></object>";			
		/*var flashEmbedTags = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="player" width="705" height="353" align="middle"><param name="wmode" value="transparent"><param name="allowScriptAccess" value="always" /><param name="movie" value="'+docPath+'/flash/player.swf?id='+fileid+'&PlayerId='+plyerid+'&sid='+sid+'" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="'+docPath+'/flash/player.swf?id='+fileid+'&PlayerId='+plyerid+'&sid='+sid+'" quality="high" bgcolor="#ffffff" width="705" height="353" swLiveConnect=true id="player" name="player" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent"/></object>';
		embedFlash(flashEmbedTags);*/
	}
	
	function MintkamPlayerProfileVideo(id,docPath,fileid,plyerid,sid,sessid){
			
		document.getElementById(id).innerHTML="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' id='player' width='528' height='220' align='middle'><param name='wmode' value='transparent'><param name='allowScriptAccess' value='always' /><param name='movie' value='"+docPath+"/flash/player_PV.swf?id="+fileid+"&PlayerId="+plyerid+"&sid="+sid+"&phpsessid="+sessid+"' /><param name='quality' value='high' /><param name='bgcolor' value='#ffffff' /><embed src='"+docPath+"/flash/player_PV.swf?id="+fileid+"&PlayerId="+plyerid+"&sid="+sid+"&phpsessid="+sessid+"' quality='high' bgcolor='#ffffff' width='528' height='220' swLiveConnect=true id='player' name='player' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='transparent'/></object>";			
		/*var flashEmbedTags = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="player" width="705" height="353" align="middle"><param name="wmode" value="transparent"><param name="allowScriptAccess" value="always" /><param name="movie" value="'+docPath+'/flash/player.swf?id='+fileid+'&PlayerId='+plyerid+'&sid='+sid+'" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="'+docPath+'/flash/player.swf?id='+fileid+'&PlayerId='+plyerid+'&sid='+sid+'" quality="high" bgcolor="#ffffff" width="705" height="353" swLiveConnect=true id="player" name="player" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent"/></object>';
		embedFlash(flashEmbedTags);*/
	}
	
	function SmallPlayerEx(id,docPath,fileid,plyerid,sessid){
			
				document.getElementById(id).innerHTML="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' id='player' width='197' height='298' align='middle'><param name='allowScriptAccess' value='always' /><param name='movie' value='"+docPath+"/flash/playerEx.swf?id="+fileid+"&PlayerId="+plyerid+"&phpsessid="+sessid+"' /><param name='quality' value='high' /><param name='bgcolor' value='#ffffff' /><embed src='"+docPath+"/flash/playerEx.swf?id="+fileid+"&PlayerId="+plyerid+"&phpsessid="+sessid+"' quality='high' bgcolor='#ffffff' width='197' height='298' swLiveConnect=true id='player' name='player' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object>";
				
	}

	function GoLivePlayer(id,docPath,fileid,plyerid,sessid){
			
	//alert(docPath+"/flash/golive.swf?id="+fileid+"&PlayerId="+plyerid+"&phpsessid="+sessid);
			
				document.getElementById(id).innerHTML="<OBJECT id='golive' codeBase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' height='800' width='800' align='middle' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'><PARAM NAME='allowScriptAccess' VALUE='always'><PARAM NAME='movie' VALUE='"+docPath+"/flash/golive.swf?id="+fileid+"&PlayerId="+plyerid+"&phpsessid="+sessid+"'><PARAM NAME='quality' VALUE='high'><PARAM NAME='bgcolor' VALUE='#ffffff'><embed src='"+docPath+"/flash/golive.swf?id="+fileid+"&PlayerId="+plyerid+"&phpsessid="+sessid+"' quality='high' bgcolor='#ffffff' width='800' height='800' name='golive' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></OBJECT>";					
	}


	function profileLagerPlayer(id,docPath,fileid,sessid){
			
				document.getElementById(id).innerHTML="<OBJECT id='enlarged' codeBase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' height=648 width=750 align='middle' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'><PARAM NAME='allowScriptAccess' VALUE='always'><PARAM NAME='movie' VALUE='"+docPath+"/flash/Enlarged.swf?"+fileid+"&phpsessid="+sessid+"'><PARAM NAME='quality' VALUE='high'><PARAM NAME='bgcolor' VALUE='#ffffff'><embed src='"+docPath+"/flash/Enlarged.swf?"+fileid+"&phpsessid="+sessid+"' quality='high' bgcolor='#ffffff' width='750' height='648' name='enlarged' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></OBJECT>";					
	}

	function jukeboxPlayer(id,docPath,sessid){
			
				document.getElementById(id).innerHTML="<OBJECT id='jukebox' codeBase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' height=667 width=500 align='middle' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'><PARAM NAME='allowScriptAccess' VALUE='always'><PARAM NAME='movie' VALUE='"+docPath+"/flash/jukeBox.swf?phpsessid="+sessid+"'><PARAM NAME='quality' VALUE='high'><PARAM NAME='bgcolor' VALUE='#ffffff'><embed src='"+docPath+"/flash/jukeBox.swf?phpsessid="+sessid+"' quality='high' bgcolor='#ffffff' width='500' height='667' name='enlarged' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></OBJECT>";					
	}
		function ChatRoomNewWindow(id,docPath,rid,membername,roomname,myid,senderid,sendername){
				
				document.getElementById(id).innerHTML="<OBJECT id=chatroomnewin codeBase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 height=460 width=300 align=middle classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000><PARAM NAME='wmode' value='transparent'> <PARAM NAME='allowScriptAccess' VALUE='always'><PARAM NAME='movie' VALUE='"+docPath+"/flash/roomnewwin.swf?Roomid="+rid+"&SenderName="+sendername+"&SenderSessionId="+senderid+"&MySessionId="+myid+"&Room="+roomname+"&Member="+membername+"'><PARAM NAME='quality' VALUE='high'><PARAM NAME='bgcolor' VALUE='#ffffff'><embed src='"+docPath+"/flash/roomnewwin.swf?Roomid="+rid+"&SenderName="+sendername+"&SenderSessionId="+senderid+"&MySessionId="+myid+"&Room="+roomname+"&Member="+membername+"' quality='high' bgcolor='#ffffff' wmode='transparent' width='300' height='460' name='chatroomnewin' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></OBJECT>";		
				
		} 	
/*	function ChatRoom(id,docPath,rid,memberId,plyerid){
				
				document.getElementById(id).innerHTML="<OBJECT id=chatroom codeBase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 height=700 width=890 align=middle classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000><PARAM NAME='allowScriptAccess' VALUE='always'><PARAM NAME='movie' VALUE='"+docPath+"/flash/chatroom.swf?Roomid="+rid+"&MemberId="+memberId+"'><PARAM NAME='quality' VALUE='high'><PARAM NAME='bgcolor' VALUE='#ffffff'><embed src='"+docPath+"/flash/chatroom.swf?Roomid="+rid+"&MemberId="+memberId+"' quality='high' bgcolor='#ffffff' width='890' height='700' name='chatroom' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></OBJECT>";					
		}*/
	
	function ChatRoom(id,docPath,rid,memberId,plyerid,sessid){
				
				document.getElementById(id).innerHTML="<OBJECT id=chatroom codeBase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 height=700 width=890 align=middle classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000><PARAM NAME='wmode' value='opaque'><PARAM NAME='allowScriptAccess' VALUE='always'><PARAM NAME='movie' VALUE='"+docPath+"/flash/chatroom.swf?Roomid="+rid+"&MemberId="+memberId+"&phpsessid="+sessid+"'><PARAM NAME='quality' VALUE='high'><PARAM NAME='bgcolor' VALUE='#ffffff'><embed src='"+docPath+"/flash/chatroom.swf?Roomid="+rid+"&MemberId="+memberId+"&phpsessid="+sessid+"' quality='high' bgcolor='#ffffff' width='890' height='700' name='chatroom' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></OBJECT>";					
		}

	
	function ChatOne(id,docPath,rid,memberId,friendId,sessid){
				
				document.getElementById(id).innerHTML="<OBJECT id=chatroom codeBase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 width='100%' height='100%' align=middle classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000><PARAM NAME='allowScriptAccess' VALUE='always'><PARAM NAME='movie' VALUE='"+docPath+"/flash/onechat.swf?Roomid="+rid+"&MemberId="+memberId+"&FriendId="+friendId+"&phpsessid="+sessid+"'><PARAM NAME='quality' VALUE='high'> <param name='wmode' value='transparent'><PARAM NAME='bgcolor' VALUE='#ffffff'><embed src='"+docPath+"/flash/onechat.swf?Roomid="+rid+"&MemberId="+memberId+"&FriendId="+friendId+"&phpsessid="+sessid+"' quality='high' bgcolor='#ffffff' width='100%' height='100%' name='chatroom' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></OBJECT>";
		}

	function HomePageIntro(id,docPath){

				document.getElementById(id).innerHTML="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='445' height='173'><param name='wmode' value='transparent'><param name='movie' value='"+docPath+"/flash/intro1.swf'><param name='quality' value='high'><embed src='"+docPath+"/flash/intro1.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='445' height='173' wmode='transparent'></embed></object>";
					
	}
				
	function FreeWebCam(id,docPath){
				document.getElementById(id).innerHTML="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='245' height='169' title='free cam offer'><param name='wmode' value='transparent'><param name='movie' value='"+docPath+"/flash/freeCam1.swf'><param name='quality' value='high'><embed src='"+docPath+"/flash/freeCam1.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='245' height='169' wmode='transparent'></embed></object>";
				//alert(document.getElementById(id).value);
					
	}
	function CamITTHomePlayer(id,docPath){
				document.getElementById(id).innerHTML="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='197' height='228'><param name='movie' value='"+docPath+"/flash/CamItt_homePage.swf'><param name='quality' value='high'><embed src='"+docPath+"/flash/CamItt_homePage.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='197' height='228'></embed></object>";
	}
	function ProfileLogo(id,docPath){
				document.getElementById(id).innerHTML="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='195' height='93'><param name='movie' value='"+docPath+"/flash/ProfileLogo.swf'><param name='quality' value='high'><param name='wmode' value='transparent'><embed src='"+docPath+"/flash/ProfileLogo.swf' width='195' height='93' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' wmode='transparent'></embed></object>";
	}
	function Recorder(id,docPath, stream){
				document.getElementById(id).innerHTML="<OBJECT id='recorder' codeBase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' height='459' width='371' align='middle' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'><PARAM NAME='allowScriptAccess' VALUE='sameDomain'><PARAM NAME='movie' VALUE='"+docPath+"/flash/recorder.swf?PublishStream="+stream+"'><PARAM NAME='quality' VALUE='high'><PARAM NAME='bgcolor' VALUE='#ffffff'><embed src='"+docPath+"/flash/recorder.swf?PublishStream="+stream+"' quality='high' bgcolor='#ffffff' width='371' height='459' name='recorder' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></OBJECT>";					
	}
	
	function RecorderSnap(id,docPath, stream, memberid){
		// alert(memberid);
				document.getElementById(id).innerHTML="<OBJECT id='recorder' codeBase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' height='459' width='371' align='middle' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'><PARAM NAME='allowScriptAccess' VALUE='always'><PARAM NAME='movie' VALUE='"+docPath+"/flash/recorder_snap.swf?PublishStream="+stream+"&id="+memberid+"'><PARAM NAME='quality' VALUE='high'><PARAM NAME='bgcolor' VALUE='#ffffff'><embed src='"+docPath+"/flash/recorder_snap.swf?PublishStream="+stream+"&id="+memberid+"' quality='high' bgcolor='#ffffff' width='371' height='459' name='recorder' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></OBJECT>";					
	}
	
	
	function SoundMixer(id,docPath,trackPath,memberid)
	{
	alert(id);
	alert(docPath);
	alert(trackPath);
	alert(memberid);
	
	// alert(memberid);
			/*	document.getElementById(id).innerHTML="<OBJECT id='recorder' codeBase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' height='459' width='371' align='middle' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'><PARAM NAME='allowScriptAccess' VALUE='always'><PARAM NAME='movie' VALUE='"+docPath+"/flash/soundmixer.swf?PublishStream="+trackPath+"&id="+memberid+"'><PARAM NAME='quality' VALUE='high'><PARAM NAME='bgcolor' VALUE='#ffffff'><embed src='"+docPath+"/flash/soundmixer.swf?PublishStream="+trackPath+"&id="+memberid+"' quality='high' bgcolor='#ffffff' width='371' height='459' name='recorder' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></OBJECT>";					
	*/
	}
	
	
	
	function RecorderWebloSnap(id,docPath, stream, memberid){
		// alert(memberid);
				document.getElementById(id).innerHTML="<OBJECT id='recorder' codeBase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' height='578' width='371' align='middle' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'><PARAM NAME='allowScriptAccess' VALUE='sameDomain'><PARAM NAME='movie' VALUE='"+docPath+"/flash/hellRecorder.swf?PublishStream="+stream+"&id="+memberid+"'><PARAM NAME='quality' VALUE='high'><PARAM NAME='bgcolor' VALUE='#ffffff'><embed src='"+docPath+"/flash/hellRecorder.swf?PublishStream="+stream+"&id="+memberid+"' quality='high' bgcolor='#ffffff' width='371' height='578' name='recorder' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></OBJECT>";					
	}

	function AudioPlayer(id,docPath,audioid){

		 //alert(id); //alert(docPath); //alert(audioid);
		 document.getElementById(id).innerHTML="<OBJECT id='audioplayer' codeBase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' height='52' width='194' align='middle' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'><PARAM NAME='allowScriptAccess' VALUE='sameDomain'><PARAM NAME='movie' VALUE='"+docPath+"/flash/audioplayer.swf?audioid="+audioid+"'><PARAM NAME='quality' VALUE='high'><PARAM NAME='bgcolor' VALUE='#ffffff'><embed src='"+docPath+"/flash/audioplayer.swf?audioid="+audioid+"' quality='high' bgcolor='#ffffff' width='194' height='52' name='audioplayer' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></OBJECT>";	
	
	}

	

	function setChildVisibilityWithNodeName(element, nodeName, visibility) 
	{
		if(typeof(element)!="undefined")
		for (var i = 0 ; i < element.childNodes.length; i++ ) {
			if (element.childNodes[i].nodeName == nodeName) {
				setElementVisibility(element.childNodes[i], visibility);
			}
		}
	}


	function PlayAudio(id,docPath,fileName,featured)
	{
		//alert(id);
		//alert(docPath);
		//alert(fileName);
		document.getElementById(id).innerHTML="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='93' height='10' id='' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='movie' value='"+docPath+"/flash/mp3player_100px.swf?AudioFile="+fileName+"' /><param name='quality' value='high' /><param name='bgcolor' value='#ffffff' /><embed src='"+docPath+"/flash/mp3player_100px.swf?AudioFile="+fileName+"' quality='high' bgcolor='#ffffff' width='93' height='10' name='' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object>";
	}

	function PlayVIM(id,docPath, fileName){
					var imagePath=fileName.replace(".flv",".jpg");

					document.getElementById(id).innerHTML="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='320' height='240' id='' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='movie' value='"+docPath+"/flash/flvPlayer_320.swf?flvPath="+fileName+"&imagePath="+imagePath+"' /><param name='quality' value='high' /><param name='bgcolor' value='#ffffff' /><embed src='"+docPath+"/flash/flvPlayer_320.swf?flvPath="+fileName+"&imagePath="+imagePath+"' quality='high' bgcolor='#ffffff' width='320' height='240' name='' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object>";					
	}

	function PlayVideo(element,docPath,fileName,featured)
	{
			
		hideVideo();
		var imagePath=fileName.replace(".flv",".jpg");
		
		if(featured== "large"){
			
					//var videocode="<div id='flash_video'><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='239' height='173' id='' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='movie' value='"+docPath+"/flash/flvPlayer_320.swf?flvPath="+fileName+"&imagePath="+imagePath+"' /><param name='quality' value='high' /><param name='bgcolor' value='#ffffff' /><embed src='"+docPath+"/flash/flvPlayer_320.swf?flvPath="+fileName+"&imagePath="+imagePath+"' quality='high' bgcolor='#ffffff' width='320' height='240' name='' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object></div>";
					var videocode="<div id='flash_video'><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='239' height='173' id='' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='allowFullScreen' value='true' /><param name='allowFullScreen' value='true'/><param name='movie' value='"+docPath+"/flash/flvPlayer_320.swf?flvPath="+fileName+"&imagePath="+imagePath+"' /><param name='quality' value='high' /><param name='bgcolor' value='#ffffff' /><embed src='"+docPath+"/flash/flvPlayer_320.swf?flvPath="+fileName+"&imagePath="+imagePath+"' quality='high' bgcolor='#ffffff' width='320' height='240' name='' align='middle' allowFullScreen='true' allowScriptAccess='sameDomain' allowFullScreen='true' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object></div>";
				
				}else if(typeof(featured)!= "undefined"){
					var videocode="<div id='flash_video'><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='168' height='118' id='' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='allowFullScreen' value='true' /><param name='movie' value='"+docPath+"/flash/flvPlayer_middle.swf?flvPath="+fileName+"&imagePath="+imagePath+"' /><param name='quality' value='high' /><param name='bgcolor' value='#ffffff' /><embed src='"+docPath+"/flash/flvPlayer_middle.swf?flvPath="+fileName+"&imagePath="+imagePath+"' quality='high' bgcolor='#ffffff' width='168' height='118' name='' allowFullScreen='true' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object></div>";
			
				
				}else{
				
				
					var videocode="<div id='flash_video'><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='120' height='90' id='' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='allowFullScreen' value='true' /><param name='movie' value='"+docPath+"/flash/flvPlayer_small.swf?flvPath="+fileName+"&imagePath="+imagePath+"' /><param name='quality' value='high' /><param name='bgcolor' value='#ffffff' /><param name='wmode' value='transparent' /><embed src='"+docPath+"/flash/flvPlayer_small.swf?flvPath="+fileName+"&imagePath="+imagePath+"' quality='high' bgcolor='#ffffff' width='120' height='90' name='' align='middle' allowFullScreen='true' allowScriptAccess='sameDomain' wmode='transparent' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object></div>";
				}
		
		var newElement = document.createElement('div');
		newElement.innerHTML = videocode;
		//alert(element.parentNode)
		setChildVisibilityWithNodeName(element.parentNode, "A", false);
		element.parentNode.appendChild(newElement);

		return false;	
						
	}

	function PlayTVVideo(element,docPath,fileName,featured)
	{	
		hideVideo();
		var imagePath=fileName.replace(".flv",".jpg");
		var videocode="<div id='flash_audio'><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='236' height='151' id='' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='movie' value='"+docPath+"/flash/player_tv.swf?flvPath="+fileName+"&imagePath="+imagePath+"' /><param name='quality' value='high' /><param name='bgcolor' value='#ffffff' /><param name='allowFullScreen' value='true' /><param name='wmode' value='transparent' /><embed src='"+docPath+"/flash/player_tv.swf?flvPath="+fileName+"&imagePath="+imagePath+"' quality='high' bgcolor='#ffffff' width='236' height='151' allowFullScreen='true'  name='' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='transparent' /></object></div>";
		var newElement = document.createElement('div');
		newElement.innerHTML = videocode;
		//alert(element.parentNode)
		setChildVisibilityWithNodeName(element.parentNode, "A", false);
		element.parentNode.appendChild(newElement);
	
		return false;	
						
	}
	
function hideAudio() {
	
	var element = getElement("flash_audio");
	//alert(element);
	if ((element) && typeof(element)!= "undefined") {
		var parent = element.parentNode.parentNode;
		var videocode = '<div id="flash_audio"></div>';
	  	element.innerHTML = videocode;
		//alert(element.innerHTML);
		removeElement(element.parentNode);
		setChildVisibilityWithNodeName(parent, "A", true);
	}
}
function AudioJsPlayer(element,docPath,audioid,VideoType)
	{
		//alert(element);
		hideAudio();
		//alert(element+":"+docPath+":"+audioid+":"+VideoType);
		var videocode='<div id="flash_audio"><OBJECT id="audioplayer" codeBase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" height="52" width="194" align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"><PARAM NAME="allowScriptAccess" VALUE="sameDomain"><param name="wmode" value="transparent"><PARAM NAME="movie" VALUE="'+docPath+'/documentSetting/flash/audioplayer.swf?audioid='+audioid+'"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#ffffff"><embed src="'+docPath+'/documentSetting/flash/audioplayer.swf?audioid='+audioid+'" quality="high" bgcolor="#ffffff" width="194" height="52" name="audioplayer" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent"/></OBJECT></div>';
		var newElement = document.createElement('div');
		newElement.innerHTML = videocode;

		setChildVisibilityWithNodeName(element.parentNode, "A", false);
		//alert(element.parentNode.id)
		element.parentNode.appendChild(newElement);
		return false;	
		 

	}
function hideVideo() {
	
	var element = getElement("flash_video");
	if ((element) && typeof(element)!= "undefined") {
		var parent = element.parentNode.parentNode;
		var videocode = '<div id="flash_video"></div>';
	  	element.innerHTML = videocode;
		removeElement(element.parentNode);
		setChildVisibilityWithNodeName(parent, "A", true);
	}
}
function getElement(elementName) {
 if(document.getElementById && document.getElementById(elementName)) {
    return document.getElementById(elementName);
  }
  else if (document.all && document.all(elementName)) {
    return document.all(elementName);
  }
  else if (document.layers && document.layers[elementName]) {
    return document.layers[elementName];
  } else {
    return false;
  }
}

function setElementVisibility(ele, visibility) {
	if (visibility) {
		showElement(ele);
	} else {
		hideElement(ele);
	}
}

function hideElement(ele) {
  ele.style.display = "none";
}

function showElement(ele) {
  ele.style.display = "";
}

function removeElement(ele) {
  ele.parentNode.removeChild(ele);
}
function FreeWebCam1(id,docPath){
				document.getElementById(id).innerHTML=docPath
}
