var newwin = '';
function MM_openBrWindow(theURL,winName,features) { //v2.0
		newwin =  window.open(theURL,winName,features);
}

function playSong(listid,thesongname) {
			newwin = window.open('http://www.yenta4.com/music/player/player.php?cmd=play&l='+escape(listid)+'&t='+escape(thesongname),'newwin','width=350,height=583');

		     window.newwin.focus();

}

function addList(listid,thesongname) {
	
				newwin = window.open('http://www.yenta4.com/music/player/save_cookie.php?l='+escape(listid)+'&t='+escape(thesongname),'newwin','width=350,height=583,resizable=0');


                window.newwin.focus();

}

function resizeWindow()
{
				//window.resizeTo(350,421);
				//window.frameset.rows=583;
				//this.parent.rows="350,200";
}


function addList1(listid,thesongname) {
		if(typeof(newwin)!='object'){
			//alert('not typeof object');
			newwin = parent.open('http://www.yenta4.com/music/player/player.php?cmd=add&l='+escape(listid)+'&t='+escape(thesongname),'newwin','width=350,height=583');
		} else {
			if(newwin.closed){
				//alert('newwin closed');
				newwin = parent.open('http://www.yenta4.com/music/player/player.php?cmd=add&l='+escape(listid)+'&t='+escape(thesongname),'newwin','width=350,height=583');
			} else {
			parent.mainFrame.flashplayer.setVariable("listid",listid);
			parent.mainFrame.flashplayer.setVariable("listtitle",thesongname);
			parent.mainFrame.flashplayer.setVariable("mode",'add');
			parent.mainFrame.flashplayer.TCallFrame("_root",9);
			/*
			parent.document.flashplayer.setVariable("listid",listid);
			parent.document.flashplayer.setVariable("listtitle",thesongname);
			parent.document.flashplayer.setVariable("mode",'add');
			parent.document.flashplayer.TCallFrame("_root",9);
			*/
			//this.blur();
   			parent.focus();
			}
		}
}




function SF(songid){
	sfr = window.open('sendtofriend.php?i='+songid+'&t='+songid,'sfr','width=345,height=300');
}

function Lyric(songid){
	sfr = window.open('lyric.php?i='+songid+'&t='+songid,'sfr','width=345,height=300,scrollBars=1');
}


function AddAlbum(songid){
	addsongalbum = window.open('addsong_to_album.php?songidi='+songid+'&t='+songid,'sfr','width=345,height=300');
}

function AddAlbum1(songid){
	addsongalbum = window.opener.open('addsong_to_album.php?songidi='+songid+'&t='+songid,'sfr','width=345,height=300');
}

function playAlbum(albumid,albumtype) {
		if(typeof(newwin)!='object'){
			newwin = window.open('http://www.yenta4.com/music/player/player.php?i='+escape(albumid)+'&t='+escape(albumtype),'newwin','width=350,height=583');
		} else {
			if(newwin.closed){
			newwin = window.open('http://www.yenta4.com/music/player/player.php?i='+escape(albumid)+'&t='+escape(albumtype),'newwin','width=350,height=583');
			} else {
			newwin.mainFrame.flashplayer.setVariable("albumid",albumid);
			newwin.mainFrame.flashplayer.setVariable("albumtype",albumtype);
			newwin.mainFrame.flashplayer.setVariable("mode",'playalbum');
			newwin.mainFrame.flashplayer.TCallFrame("_root",9);
			//this.blur();
   			newwin.focus();
			}
		}
}

function showsize_big(){
	iw = document.body.clientWidth;
	ih = document.body.clientHeight;
	//window.resizeBy(350-iw,421-ih);
//	newwin.formflash1.flashplayer.width = 345;
//	newwin.formflash1.flashplayer.height = 405;
//	alert("BIGGGG")
}

function showsize_small(){
	iw = document.body.clientWidth;
	ih = document.body.clientHeight;
	//window.resizeBy(350-iw,140-ih);
//	newwin.formflash1.flashplayer.width = 345;
//	newwin.formflash1.flashplayer.height = 200;
//	alert("Small")
}
