//Full screen function

function playfullscreen(movielink){
	width = screen.width;
	height = screen.height;
 window.open ("http://localhost/new3arab/3arabtv/fullscreen.php?id="+movielink+"&w="+height,"3arabwindow",'scrollbars=no,width='+height+',height='+height+',left=0,top=0');
}

 function writemovie(movielink,type){
	width = 547;
	height = width;
	if(type=='google')
	{
  	movie = '<EMBED id=VideoPlayback ';
	movie += 'style="WIDTH: '+width+'px; HEIGHT: '+height+'px" ';
	movie += 'src="http://video.google.com/googleplayer.swf?docId='+movielink+'"';
	movie += 'type=application/x-shockwave-flash ';
	movie += 'FlashVars="playerMode=normal&amp;autoPlay=true&amp;playerId=gvuniqueid&fs=true" ';
	movie += 'salign="TL" scale="noScale" bgcolor="#000000" quality="best" ';
	movie += 'allowScriptAccess="always" allowfullscreen="true">';
	}
	else if (type == 'asx')
	{
		movie = '<object width="'+width+'" height="'+height+'" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" name="mediaplayer1"  id="mediaplayer1">';
	movie += ' <param name="Filename" value="'+movielink+'">';
	movie += '<param name="EnableContextMenu" value="1"> ';
	movie += ' <param name="AutoStart" value="True">';
	movie += ' <param name="ShowControls" value="true">';
	movie += '<param name="ShowStatusBar" value="true">';
	movie += ' <param name="ShowDisplay" value="False">';
	movie += '<param name="volume" value="100">';
	movie += '<param name="uiMode" value="full">';
	movie += '<param name="windowlessVideo" value="0">';
	movie += '<param name="fullScreen" value="0">';
	movie += '<param name="AutoRewind" value="True">';
	movie += '<param name="enableErrorDialogs" value="0">';
	movie += '<embed pluginspage="http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=Media&sba=Plugin&" src="'+movielink+'" width='+width+'" height="'+height+'" autostart="True" showcontrols="True" showstatusbar="False"  showdisplay="true" autorewind="True" enableContextMenu=1 windowlessVideo=1 uiMode=full stretchToFit=1 fullscreen=1> </embed>';
	movie += '</object>';
	}
	else if (type == 'yimg')
	{
		movie = '<object width="'+width+'" height="'+height+'"  id="mediaplayer1">';
		movie += '<param value="true" name="allowFullScreen"/>';
		movie += '<param value="always" name="AllowScriptAccess"/>';
		movie += '<param value="#000000" name="bgcolor"/>';
		movie += '<param value="'+movielink+'&amp;autoPlay=1 "name="flashVars"/>';
		movie += '<embed height="'+height+'" width="'+width+'" ';
		movie += 'bgcolor="#000000" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.18.2" flashvars="'+movielink+'&amp;autoPlay=1"/>';
		movie += '</object>';
	}
	else if (type == 'mbc')
	{
		movie = '<embed id="LIB_MediaPreview_flashObject" ';
		movie += 'height="'+height+'" width="'+width+'" menu="false" allowfullscreen="true" allownetworking="all" allowscriptaccess="always" ';
		movie += 'flashvars="file='+movielink+'&height='+height+'&width='+width+'&autostart=true&enablejs=true&bcategory=&backcolor=0x002335" ';
		movie += 'wmode="Window" quality="high" name="LIB_MediaPreview_flashObject" style="" ';
		movie += 'src="http://vramadan.mbc.net/locallib/flvPlayer/jwflvplayer_viz1.swf?v=1" type="application/x-shockwave-flash" />';	
	}
	else if (type == 'myspace')
	{
		movie = '<object width="'+width+'" height="'+height+'"  id="mediaplayer1">';
		movie += '<param value="true" name="allowFullScreen"/>';
		movie += '<param value="always" name="AllowScriptAccess"/>';
		movie += '<param name="movie" value="'+movielink+'"/>';
		movie += '<embed height="'+height+'" width="'+width+'" ';
		movie += 'allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" src="'+movielink+'" />';
		movie += '</object>';
	}
	else if (type == '.swf')
	{
		movie = '<object width="'+width+'" height="'+height+'"  id="mediaplayer1">';
		movie += '<param value="true" name="allowFullScreen"/>';
		movie += '<param value="always" name="AllowScriptAccess"/>';
		movie += '<param value="autostart=true" name="flashvars"/>';
		movie += '<param value="#000000" name="bgcolor"/>';
		movie += '<param value="'+movielink+'"name="movie"/>';
		movie += '<embed height="'+height+'" width="'+width+'" flashvars="autostart=true"';
		movie += 'bgcolor="#000000" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" src="'+movielink+'"/>';
		movie += '</object>';
	}
	writit(movie,'obj');
  }
  
 
  
  function writit(text,id)
	{
		if (document.getElementById)
		{
			x = document.getElementById(id);
			x.innerHTML = '';
			x.innerHTML = text;
		}
		else if (document.all)
		{
			x = document.all[id];
			x.innerHTML = text;
		}
		else if (document.layers)
		{
			x = document.layers[id];
			text2 = '<P CLASS="testclass">' + text + '</P>';
			x.document.open();
			x.document.write(text2);
			x.document.close();
		}
	}


//Bookmark script
function bookmarkthis(){
	var BookmarkURL=location.href;
	var BookmarkTitle="3arabTV.com"
	
	// If the browser is Internet Explorer
	if (document.all)
	{
			// Add to Favorites (Internet Explorer)
			window.external.AddFavorite(BookmarkURL,BookmarkTitle)
	}
	else
	{
			// Add to Bookmarks (Mozilla Firefox)
			window.sidebar.addPanel(BookmarkTitle, BookmarkURL, '');
	}
}

