Server : Apache/2.4.43 (Win64) OpenSSL/1.1.1g PHP/7.4.6
System : Windows NT USER-PC 6.1 build 7601 (Windows 7 Professional Edition Service Pack 1) AMD64
User : User ( 0)
PHP Version : 7.4.6
Disable Function : NONE
Directory :  C:/Program Files/CyberLink/PowerDirector/web/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : C:/Program Files/CyberLink/PowerDirector/web/user.htm
<html>
	<STYLE> DIV.title { PADDING-LEFT: 1px; FONT-SIZE: 12px; MARGIN-BOTTOM: 1px; COLOR: #000066; LINE-HEIGHT: 9px; FONT-FAMILY: monospace; LETTER-SPACING: 2px; HEIGHT: 9px }
	DIV.main { BORDER-RIGHT: #000066 1px solid; BORDER-TOP: #000066 1px solid; BORDER-LEFT: #000066 1px solid; BORDER-BOTTOM: #000066 1px solid }
	DIV.domTT { BORDER-RIGHT: #333333 1px solid; BORDER-TOP: #333333 1px solid; BORDER-LEFT: #333333 1px solid; BORDER-BOTTOM: #333333 1px solid; BACKGROUND-COLOR: #333333 }
	DIV.domTT .caption { PADDING-RIGHT: 2px; PADDING-LEFT: 2px; FONT-WEIGHT: bold; FONT-SIZE: 12px; PADDING-BOTTOM: 1px; COLOR: #ffffff; PADDING-TOP: 1px; FONT-FAMILY: serif }
	DIV.domTT .contents { PADDING-RIGHT: 2px; PADDING-LEFT: 2px; FONT-SIZE: 12px; PADDING-BOTTOM: 3px; PADDING-TOP: 3px; FONT-FAMILY: sans-serif; BACKGROUND-COLOR: #f1f1ff }
	DIV.domTTClassic { BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid; BACKGROUND-COLOR: infobackground }
	DIV.domTTClassic .caption { PADDING-RIGHT: 2px; PADDING-LEFT: 2px; FONT-WEIGHT: bold; FONT-SIZE: 12px; PADDING-BOTTOM: 1px; PADDING-TOP: 1px; FONT-STYLE: italic; FONT-FAMILY: serif }
	DIV.domTTClassic .contents { PADDING-RIGHT: 2px; PADDING-LEFT: 2px; FONT-SIZE: 12px; PADDING-BOTTOM: 0px; COLOR: infotext; PADDING-TOP: 1px; FONT-FAMILY: Arial, sans-serif }
	DIV.domTTWin { BORDER-RIGHT: #bfbfbf 2px outset; BORDER-TOP: #bfbfbf 2px outset; BORDER-LEFT: #bfbfbf 2px outset; BORDER-BOTTOM: #bfbfbf 2px outset; BACKGROUND-COLOR: #808080 }
	DIV.domTTWin .caption { BORDER-RIGHT: #bfbfbf 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #bfbfbf 1px solid; PADDING-LEFT: 2px; FONT-WEIGHT: bold; FONT-SIZE: 12px; PADDING-BOTTOM: 2px; BORDER-LEFT: #bfbfbf 1px solid; COLOR: white; PADDING-TOP: 2px; BORDER-BOTTOM: #bfbfbf 0px solid; FONT-FAMILY: sans-serif; BACKGROUND-COLOR: #00007f }
	DIV.domTTWin .contents { BORDER-RIGHT: #bfbfbf 1px solid; BORDER-TOP: #bfbfbf 1px solid; BORDER-LEFT: #bfbfbf 1px solid; BORDER-BOTTOM: #bfbfbf 1px solid }
	DIV.domTTOverlib { BORDER-RIGHT: #333366 1px solid; BORDER-TOP: #333366 1px solid; BORDER-LEFT: #333366 1px solid; BORDER-BOTTOM: #333366 1px solid; BACKGROUND-COLOR: #333366 }
	DIV.domTTOverlib .caption { FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #ffffff; FONT-FAMILY: Verdana, Helvetica }
	DIV.domTTOverlib .contents { PADDING-RIGHT: 2px; PADDING-LEFT: 2px; FONT-SIZE: 10px; PADDING-BOTTOM: 2px; PADDING-TOP: 2px; FONT-FAMILY: Verdana, Helvetica; BACKGROUND-COLOR: #f1f1ff }
	DIV.niceTitle { PADDING-RIGHT: 4px; PADDING-LEFT: 4px; FONT-WEIGHT: bold; FONT-SIZE: 13px; Z-INDEX: 20; FILTER: progid:DXImageTransform.Microsoft.Alpha(opacity=87); LEFT: 0px; PADDING-BOTTOM: 4px; WIDTH: 250px; COLOR: #ffffff; PADDING-TOP: 4px; FONT-FAMILY: "Trebuchet MS", sans-serif; POSITION: absolute; TOP: 0px; BACKGROUND-COLOR: #333333; TEXT-ALIGN: left; moz-border-radius: 0 10px 10px 10px; moz-opacity: .87; khtml-opacity: .87; opacity: .87 }
	DIV.niceTitle .contents { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; FILTER: progid:DXImageTransform.Microsoft.Alpha(opacity=100); PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; moz-opacity: 1; khtml-opacity: 1; opacity: 1 }
	DIV.niceTitle P { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 9px; PADDING-BOTTOM: 0px; MARGIN: 0px; COLOR: #d17e62; PADDING-TOP: 3px; TEXT-ALIGN: left; moz-opacity: 1 }
	DIV.domTTMenu { BORDER-RIGHT: #e6e6e6 2px outset; BORDER-TOP: #e6e6e6 2px outset; BORDER-LEFT: #e6e6e6 2px outset; WIDTH: 150px; BORDER-BOTTOM: #e6e6e6 2px outset }
	DIV.domTTMenu .caption { FONT-SIZE: 12px; FONT-FAMILY: sans-serif; BACKGROUND-COLOR: #e6e6e6 }
	DIV.domTTMenu .contents { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 1px; PADDING-TOP: 1px; BACKGROUND-COLOR: #e6e6e6 }
	</STYLE>
	<SCRIPT language="javascript" src="domLib.js" type="text/javascript"></SCRIPT>
	<SCRIPT language="javascript" src="domTT.js" type="text/javascript"></SCRIPT>
	<SCRIPT language="javascript" src="MD5.js" type="text/javascript"></SCRIPT>
	<SCRIPT language="javascript" src="FlickrAction.js" type="text/javascript"></SCRIPT>
	<SCRIPT language="javascript" src="hashtable.js" type="text/javascript"></SCRIPT>
	<script type="text/javascript">
	
	var strPhotoUrl;
	var strFrob;
	var nPhotoNum = 0;
	var nContract_id;
	var m_strCurrent_person_id;
	var m_StrPhotoset_id = "";
	
	var m_nCurrentPhotoSetPage = 1;
	
	
	var m_htPhotoID = new Hashtable;
	var m_htPhotoTitle = new Hashtable;
	
	var m_nWindowWidth = 480;
	var m_nWindowHeight = 290;
	
	var m_nPhotosInWidth = 10;
	var m_nPhotosInHeight = 10;

	var m_bGetNotInSetInfo = true;
	var m_bIsNotInSet = false;
	var m_bHaveNotInSetPhotos = false;
	var m_strNotInSetThumbnailUrl = "";
	var m_nNotInSetPhotoCount = 0;
	var m_strNotInSetText = "Not in set";
	var m_strSetPhotos = "Photos:";
	
	//for InfoArea use
	var m_CurrentPhotoSetInfo_ImageURL;
	var m_CurrentPhotoSetInfo_PhotosetID;
	var m_CurrentPhotoSetInfo_Description;
	var m_CurrentPhotoSetInfo_Title;
	var m_CurrentPhotoSetInfo_PhotosCount;
	var m_bShowPhotoSet;
	
	function SetNotInSetText(strNotInSetText)
	{
		m_strNotInSetText = strNotInSetText;
	}
	
	function SetPhotosText(strPhotosText)
	{
		m_strSetPhotos = strPhotosText;
	}

	function GetPhotoUser(photo_td)
	{
		var strUser = "";
		var strPhoto_Title = "GetPhotoUser:"+decodeURI(strUser);
		location = strPhoto_Title;
	}
	
	function UpdateUpLevelButtonStatus(bEnable)
	{
		var strEnableUpLevelButton;
		if(bEnable == true)
			strEnableUpLevelButton = "EnableUpLevelButton:1";
		else
			strEnableUpLevelButton = "EnableUpLevelButton:0";
		location = strEnableUpLevelButton;
	}
	
	function UpdateSelectAllButtonStatus()
	{
		var bEnable = true;
		if(m_bShowPhotoSet)
			bEnable = false;
		if(nPhotoNum == 0)
			bEnable = false;
		var strEnableSelectAllButton;
		if(bEnable == true)
			strEnableSelectAllButton = "EnableSelectAllButton:1";
		else
			strEnableSelectAllButton = "EnableSelectAllButton:0";
		location = strEnableSelectAllButton;
	}
	
	
	function GoUpLevel()
	{
		if(m_bShowPhotoSet)
		{
		}
		else
		{
			GetPhotoSetList(m_strCurrent_person_id);
		}
	}
	
	function GoToPage(nPageIndex)
	{
		m_nCurrentPageIndex = nPageIndex;

		if (m_bIsNotInSet)
		{
		    if (m_nCurrentPageIndex > m_nTotalPageNum)
		        m_nCurrentPageIndex = m_nTotalPageNum;
		    GetNotInSets(m_nCurrentPageIndex);
		}
		else if(m_bShowPhotoSet)
		{
			m_nCurrentPhotoSetPage = nPageIndex;
			if(m_nCurrentPhotoSetPage >m_nTotalPageNum)
				m_nCurrentPhotoSetPage = m_nTotalPageNum;
			updateTableWH();
			GetPhotoSetList(m_strCurrent_person_id);
		}
		else
		{
			if(m_nCurrentPageIndex >m_nTotalPageNum)
				m_nCurrentPageIndex = m_nTotalPageNum;
			GetPhotosBySetID(m_StrPhotoset_id,m_nCurrentPageIndex);	
		}
		UpdateCurPageInfo();
		UpdateTotalPageInfo();	
	}
	
	
	function ShowPersonsInfoArea(person)
	{
		var infoArea = document.getElementById("Info_Area1");
		infoArea.innerHTML = "";
		var link = document.createElement('a');
		link.setAttribute('target', "_top");
		link.setAttribute('person_id', person.nsid);
		m_strCurrent_person_id = person.nsid;
		
		var Info_Area2 = document.getElementById("Info_Area2");
		Info_Area2.innerHTML = "";
		
		link.onclick = function()
		{
			m_strCurrent_person_id = this.person_id;
			GetPhotoSetList(m_strCurrent_person_id);
			var Info_Area2 = document.getElementById("Info_Area2");
			Info_Area2.innerHTML = "";
		}
		
		var tbl     = document.createElement("table");
		var tblBody = document.createElement("tbody");
		
		
		var row1 = document.createElement("tr");
		var cell1 = document.createElement("td");	
		cell1.setAttribute('align', "center");
		
		var tbl_new     = document.createElement("table");
		tbl_new.setAttribute('cellspacing','0');
		tbl_new.setAttribute('cellpadding','0');
		var tblBody_new = document.createElement("tbody");
		tbl_new.setAttribute('border','0');
		
		
		
		var rowIcon = document.createElement("tr");
		var cellIcon = document.createElement("td");	
		cellIcon.setAttribute('width', "62");
		cellIcon.setAttribute('height', "58");
		cellIcon.setAttribute('align', "center");
		cellIcon.setAttribute('vAlign', "top");
		cellIcon.setAttribute('align', "center");
		var strBKImageFile;
		strBKImageFile = m_strSkinPath+"thumb_bg_user.png";
		cellIcon.setAttribute('background',strBKImageFile);
		
		
		var link = document.createElement('a');
		link.setAttribute('target', "_top");
		link.onclick = function()
		{
			m_nCurrentPhotoSetPage = 1;
			GetPhotoSetList(m_strCurrent_person_id);
			var infoArea = document.getElementById("Info_Area2");
			infoArea.innerHTML = "";
		}
		
		link.onmouseover = function()
		{
			this.style.cursor= 'hand';
		}
		
		link.onmouseout=function()
		{
			this.style.cursor= 'default';
		}
		
		var div = document.createElement('img');
		div.setAttribute('width', "49");
		div.setAttribute('height', "48");
		div.setAttribute('vspace', 7);
		
		var url = "http://farm" + person.iconfarm + ".static.flickr.com/" + person.iconserver + "/buddyicons/" + person.nsid + ".jpg";
		if(person.iconfarm == 0 && person.iconserver == 0)
			url = "http://www.flickr.com/images/buddyicon.jpg"
			
		div.setAttribute('src', url);
		
		var textNode = document.createTextNode(person.username._content);

		link.appendChild(div);
		
		cellIcon.appendChild(link);
		rowIcon.appendChild(cellIcon);
		
		tblBody_new.appendChild(rowIcon);
		tbl_new.appendChild(tblBody_new);
		
		cell1.appendChild(tbl_new);
		row1.appendChild(cell1);
		
		
		var row2 = document.createElement("tr");
		var cell2 = document.createElement("td");	
		cell2.setAttribute('align', "center");		
		cell2.appendChild(textNode);
		row2.appendChild(cell2);
		
		tblBody.appendChild(row1);
		tblBody.appendChild(row2);
		tbl.appendChild(tblBody);		
		infoArea.appendChild(tbl);
		tbl.setAttribute("border", "0");
	}
	
	function UpdateSetInfoArea()
	{
		var infoArea = document.getElementById("Info_Area2");
		infoArea.innerHTML = "";
		
		var tbl     = document.createElement("table");
		var tblBody = document.createElement("tbody");
		
		var row1 = document.createElement("tr");
		var cell1 = document.createElement("td");	
		
				
		var strTextPhotos = m_strSetPhotos + m_CurrentPhotoSetInfo_PhotosCount;
		var textNode = document.createTextNode(strTextPhotos);
		cell1.appendChild(textNode);
		row1.appendChild(cell1);
		
		var row2 = document.createElement("tr");
		var cell2 = document.createElement("td");	
		cell2.setAttribute('align', "center");
		
		var tbl_new     = document.createElement("table");
		tbl_new.setAttribute('cellspacing','0');
		tbl_new.setAttribute('cellpadding','0');
		var tblBody_new = document.createElement("tbody");
	
		tbl_new.setAttribute('border','0');
		
		var rowIcon = document.createElement("tr");
		var cellIcon = document.createElement("td");	
		
		cellIcon.setAttribute('align', "center");
		cellIcon.setAttribute('width', "84");
		cellIcon.setAttribute('height', "90");
		cellIcon.setAttribute('vAlign', "top");
		var strBKImageFile;
		strBKImageFile = m_strSkinPath+"thumb_bg_set.png";
		cellIcon.setAttribute('background',strBKImageFile);
		
		var link = document.createElement('a');
		link.setAttribute('target', "_top");	
		link.setAttribute('photoset_id', m_CurrentPhotoSetInfo_PhotosetID);	
		link.setAttribute('description', m_CurrentPhotoSetInfo_Description);
		var Descript = m_CurrentPhotoSetInfo_Description;
		link.setAttribute('title', Descript);
		
		link.onclick = function()
		{
			m_CurrentPhotoSetInfo_ImageURL = this.image_src;
			m_CurrentPhotoSetInfo_PhotosetID = this.photoset_id;
			GetPhotosBySetID(this.photoset_id,1);
		}

		var div = document.createElement('img');
		div.setAttribute('src', m_CurrentPhotoSetInfo_ImageURL);
		div.setAttribute('border', 0);
		div.setAttribute('description', m_CurrentPhotoSetInfo_Description);
		div.setAttribute('vspace', 6);
		div.setAttribute('align', "center");
		div.setAttribute('border', 0);
		div.setAttribute('height', "72");
		div.setAttribute('width', "72");
	
		link.appendChild(div);
		
		cellIcon.appendChild(link);
		rowIcon.appendChild(cellIcon);
		
		tblBody_new.appendChild(rowIcon);
		tbl_new.appendChild(tblBody_new);
		
		cell2.appendChild(tbl_new);
		row2.appendChild(cell2);

		var row3 = document.createElement("tr");
		var cell3 = document.createElement("td");	
		cell3.setAttribute('align', "center");
		var textNodeNobr = document.createTextNode(m_CurrentPhotoSetInfo_Title);

		cell3.appendChild(textNodeNobr);
		row3.appendChild(cell3);

		
		tblBody.appendChild(row1);
		tblBody.appendChild(row2);
		tblBody.appendChild(row3);
		
		tbl.appendChild(tblBody);
		infoArea.appendChild(tbl);
		tbl.setAttribute("border", "0");
	}
	
	function GetPhotoUrl(photo_id)
	{
		GetPhotoSizes(photo_id);
	}
	
	function GetPhotoTitle(photo_td)
	{
		var strTitle = m_htPhotoTitle.items(photo_td);
		var strPhoto_Title = "GetTitle:"+decodeURI(strTitle);
		location = strPhoto_Title;
	}
	
	function updateBKImage()
	{
		var body = document.getElementById("bkArea");
		body.background = m_strSkinPath+"flickr_user_bg.png";
	}
	
	function updateTableWH()
	{
		m_nWindowHeight = document.body.clientHeight;
		m_nWindowWidth = document.body.clientWidth*0.65;
		
		for(var i = 0;i<200;i++)
		{
			if(i>m_nWindowWidth/85)
			{
				m_nPhotosInWidth = i;
				break;
			}
		}
		
		for(var i = 0;i<200;i++)
		{
			if(i>(m_nWindowHeight-60)/130)
			{
				m_nPhotosInHeight = i;
				break;
			}
		}
		m_nPhotosPrePage = m_nPhotosInWidth*m_nPhotosInHeight;
		
		
		for(var i = 0;i<200;i++)
		{
			if(i>m_nWindowWidth/120)
			{
				m_nPhotoSetsInWidth = i;
				break;
			}
		}
		
		for(var i = 0;i<200;i++)
		{
			if(i>(m_nWindowHeight-60)/130)
			{
				m_nPhotoSetsInHeight = i;
				break;
			}
		}
		m_nPhotoSetsPrePage = m_nPhotoSetsInWidth*m_nPhotoSetsInHeight;
		
	}
	
	function OnCheckBox(photo_id,photo_title,bCheck)
	{
		if(bCheck)
		{
			m_htPhotoTitle.add(photo_id,photo_title);
			m_htPhotoID.add(photo_id,photo_title);
		}
		else
		{
			m_htPhotoTitle.remove(photo_id,photo_title);
			m_htPhotoID.remove(photo_id,photo_title);
		}
		var strSelectCount = "UpdateCurSelectCount:"+m_htPhotoTitle.count();
		location = strSelectCount;
	}
	
	function DownloadSelectedPhoto() 
	{
		for(var k in m_htPhotoID._hash)
	    {
			var strGetID = "add:"+k;
			location = strGetID;
		}
		m_htPhotoID.clear();
		var ref = "download:test";
		location = ref; 
		return; 
	}
	
	function SelectedAllPhoto() 
	{
		for (var i=0; i<nPhotoNum; i++)
		{
			var strID = "image"+ i;
			document.getElementById(strID).checked = true;
			OnCheckBox(document.getElementById(strID).photo_id,document.getElementById(strID).photo_title,true);
		}
	}
	
	function UnSelectedAllPhoto() 
	{
		for (var i=0; i<nPhotoNum; i++)
		{
			var strID = "image"+ i;
			document.getElementById(strID).checked = false;
			OnCheckBox(document.getElementById(strID).photo_id,document.getElementById(strID).photo_title,false);
		}
	}
	
	
	
	function OnButtonPrev()
	{
		if(m_bShowPhotoSet)
		{
			m_nCurrentPhotoSetPage--;
			if(m_nCurrentPhotoSetPage<=0)
				m_nCurrentPhotoSetPage = 1;
			GoToPage(m_nCurrentPhotoSetPage);
		}
		else
		{
			m_nCurrentPageIndex--;
			if(m_nCurrentPageIndex<=0)
			{
				m_nCurrentPageIndex = 1;
				return;
			}
			GoToPage(m_nCurrentPageIndex);
		}
	}
	
	function OnButtonNext()
	{
		if(m_bShowPhotoSet)
		{
			m_nCurrentPhotoSetPage++;
			if(m_nCurrentPhotoSetPage >m_nTotalPageNum)
			{
				m_nCurrentPhotoSetPage = m_nTotalPageNum;
				return;
			}
			GoToPage(m_nCurrentPhotoSetPage);
		}
		else
		{
			m_nCurrentPageIndex++;
			if(m_nCurrentPageIndex >m_nTotalPageNum)
			{
				m_nCurrentPageIndex = m_nTotalPageNum;
				return;
			}
			GoToPage(m_nCurrentPageIndex);
		}
	}
	
	function ShowToolTips(strText)
	{
		domTT_activate(this, event, 'content',strText , 'grid', 20, 'fade', 'out', 'trail', true);
	}

	function ShowPhotoSets(photosets)
	{
	    var infoArea = document.getElementById("Info_Area2");
	    infoArea.innerHTML = "";
	    m_bIsNotInSet = false;
		m_bShowPhotoSet = true;
		nPhotoNum = 0;
		UpdateSelectAllButtonStatus();
		if (photosets.photoset)
		{
		    
		    var nPhotosetCount = photosets.photoset.length; //for not in sets.
		    if(m_bHaveNotInSetPhotos)
		        nPhotosetCount = nPhotosetCount + 1;

			var body = document.getElementById("resultArea");	
			body.innerHTML = "";
			
			var tbl     = document.createElement("table");
			var tblBody = document.createElement("tbody");
			
			var nCount = 0;
			var row = document.createElement("tr");

			m_nTotalPageNum = nPhotosetCount / m_nPhotoSetsPrePage + 1;
			m_nTotalPageNum = parseInt(m_nTotalPageNum);
			
			var nStartIndex = (m_nCurrentPhotoSetPage-1)*m_nPhotoSetsPrePage;
			var nEndIndex = nStartIndex+m_nPhotoSetsPrePage;
			if (nEndIndex > nPhotosetCount)
			    nEndIndex = nPhotosetCount;
				
				
			for(var i = nStartIndex;i<nEndIndex;i++)
			{
				if(nCount>m_nPhotoSetsInWidth-1)
				{
					nCount = 0;
					row = document.createElement("tr");
				}
				nCount++;
				
				var cell = document.createElement("td");
				var nCellWidth = 450/4;
				cell.setAttribute('width', nCellWidth);
				cell.setAttribute('height', 95);
				cell.setAttribute('align', "center");
				
				var tbl_new     = document.createElement("table");
				var tblBody_new = document.createElement("tbody");
				
				
				var row1 = document.createElement("tr");
				row1.setAttribute('align', "center");
				var cell1 = document.createElement("td");	
				cell1.setAttribute('width', "84");
				cell1.setAttribute('height', "90");
				cell1.setAttribute('align', "center");
				cell1.setAttribute('vAlign', "top");
				var strBKImageFile;
				strBKImageFile = m_strSkinPath+"thumb_bg_set.png";
				cell1.setAttribute('background',strBKImageFile);

				var link = document.createElement('a');

				var url = "";
				var bIsNotInSet = false;
				if (m_bHaveNotInSetPhotos && i == nEndIndex - 1)
				    bIsNotInSet = true;

				if (!bIsNotInSet)
				{
				    url = "http://farm" + photosets.photoset[i].farm + ".static.flickr.com/" + photosets.photoset[i].server + "/" + photosets.photoset[i].primary + "_" + photosets.photoset[i].secret + "_s.jpg";
				    link.setAttribute('target', "_top");
				    link.setAttribute('photoset_id', photosets.photoset[i].id);
				    link.setAttribute('image_src', url);
				    link.setAttribute('description', photosets.photoset[i].description._content);
				    link.setAttribute('photos', photosets.photoset[i].photos);
				    link.setAttribute('title', photosets.photoset[i].title._content);
				    link.onclick = function()
				    {
				        m_CurrentPhotoSetInfo_ImageURL = this.image_src;
				        m_CurrentPhotoSetInfo_PhotosetID = this.photoset_id;
				        m_CurrentPhotoSetInfo_Description = this.description;
				        m_CurrentPhotoSetInfo_PhotosCount = this.photos;
				        m_CurrentPhotoSetInfo_Title = this.title;
				        domTT_closeAll();
				        domTT_deactivate(this, event);
				        GetPhotosBySetID(this.photoset_id, 1);
				        UpdateSetInfoArea();
				    }
				}
				else
				{
				    url = m_strNotInSetThumbnailUrl;

				    link.setAttribute('target', "_top");
				    link.setAttribute('photoset_id', m_strNotInSetText);
				    link.setAttribute('image_src', url);
				    link.setAttribute('description', m_strNotInSetText);
				    link.setAttribute('title', m_strNotInSetText);

				    link.onclick = function()
				    {
				        m_bIsNotInSet = true;
				        m_CurrentPhotoSetInfo_ImageURL = this.image_src;
				        m_CurrentPhotoSetInfo_PhotosetID = this.photoset_id;
				        m_CurrentPhotoSetInfo_Description = this.description;
				        m_CurrentPhotoSetInfo_PhotosCount = m_nNotInSetPhotoCount;
				        m_CurrentPhotoSetInfo_Title = this.title;
				        GetNotInSets(1);
				        UpdateSetInfoArea();
				    }
				}

				
				var div = document.createElement('img');
				div.setAttribute('src', url);
				div.setAttribute('vspace', 6);
				div.setAttribute('align', "center");
				div.setAttribute('border', 0);
				div.setAttribute('height', "72");
				div.setAttribute('width', "72");
				div.setAttribute('border', 0);
				div.setAttribute('align', "center");
				if (!bIsNotInSet)
				{
				    div.setAttribute('description', photosets.photoset[i].description._content);
				}
				else
				{
				    div.setAttribute('description', m_strNotInSetText);
				}
				
			
				div.onmouseover = function()
				{
					this.style.cursor= 'hand';
				}
			
				div.onmouseout=function()
				{
					this.style.cursor= 'default';
				}	
	
				link.appendChild(div);
				cell1.appendChild(link);
				cell1.setAttribute('align', "center");
				row1.appendChild(cell1);


				if (!bIsNotInSet)
				{
				    var link2 = document.createElement('a');
				    link2.setAttribute('target', "_top");
				    link2.setAttribute('photoset_id', photosets.photoset[i].id);
				    link2.setAttribute('image_src', url);
				    link2.setAttribute('description', photosets.photoset[i].description._content);
				    link2.setAttribute('photos', photosets.photoset[i].photos);
				    link2.setAttribute('title', photosets.photoset[i].title._content);

				    link2.onclick = function()
				    {
				        m_CurrentPhotoSetInfo_ImageURL = this.image_src;
				        m_CurrentPhotoSetInfo_PhotosetID = this.photoset_id;
				        m_CurrentPhotoSetInfo_Description = this.description;
				        m_CurrentPhotoSetInfo_PhotosCount = this.photos;
				        m_CurrentPhotoSetInfo_Title = this.title;
				        domTT_closeAll();
				        domTT_deactivate(this, event);
				        GetPhotosBySetID(this.photoset_id, 1);
				        UpdateSetInfoArea();
				    }
				    link2.onmouseover = function()
				    {
				        this.style.cursor = 'hand';
				    }

				    link2.onmouseout = function()
				    {
				        this.style.cursor = 'default';
				    }
				}
				else
				{
				    var link2 = document.createElement('a');
				    link2.setAttribute('target', "_top");
				    link2.setAttribute('photoset_id', "");
				    link2.setAttribute('image_src', m_strNotInSetThumbnailUrl);
				    link2.setAttribute('description', m_strNotInSetText);
				    link2.setAttribute('photos', m_nNotInSetPhotoCount);
				    link2.setAttribute('title', m_strNotInSetText);

				    link2.onclick = function()
				    {
				        m_bIsNotInSet = true;
				        m_CurrentPhotoSetInfo_ImageURL = this.image_src;
				        m_CurrentPhotoSetInfo_PhotosetID = this.photoset_id;
				        m_CurrentPhotoSetInfo_Description = this.description;
				        m_CurrentPhotoSetInfo_PhotosCount = this.photos;
				        m_CurrentPhotoSetInfo_Title = this.title;
				        GetNotInSets(1);
				        UpdateSetInfoArea();
				    }
				    link2.onmouseover = function()
				    {
				        this.style.cursor = 'hand';
				    }

				    link2.onmouseout = function()
				    {
				        this.style.cursor = 'default';
				    }
				
				}
				
				var row2 = document.createElement("tr");
				row2.setAttribute('align', "center");
				var cell2 = document.createElement("td");	
				cell2.setAttribute('align', "center");
				
				var divCell = document.createElement('div');

				if (!bIsNotInSet)
				{
				    var textNodeNobr = "<div style='width: 84px; text-overflow: ellipsis; overflow: hidden'><font size = 2><nobr>" + photosets.photoset[i].title._content + "</nobr></font></div>";
				}
				else
				{
				    var textNodeNobr = "<div style='width: 84px; text-overflow: ellipsis; overflow: hidden'><font size = 2><nobr>" + m_strNotInSetText + "</nobr></font></div>";
				}
				
				divCell.innerHTML=textNodeNobr;
				
			    link2.appendChild(divCell);
			    cell2.appendChild(link2);
		
				row2.appendChild(cell2);
				
				tblBody_new.appendChild(row1);
				tblBody_new.appendChild(row2);
				tbl_new.appendChild(tblBody_new);
				
				cell.appendChild(tbl_new);
				
				row.appendChild(cell);
				tblBody.appendChild(row);
			}
			
			tbl.appendChild(tblBody);
			body.appendChild(tbl);
			tbl.setAttribute("border", "0");
		}
		
		UpdateCurPageInfo();
		UpdateTotalPageInfo();
		UpdateUpLevelButtonStatus(false);
	}
	
	
	function UpdateTotalPageInfo() 
	{
		var ref = "UpdateTotalPageInfo:"+m_nTotalPageNum;
		location = ref; 
		return;
	}
	
	function UpdateCurPageInfo() 
	{
		var ref;
		if(m_bShowPhotoSet)
		{
			ref = "UpdateCurPageInfo:"+m_nCurrentPhotoSetPage;
		}
		else
		{
			ref = "UpdateCurPageInfo:"+m_nCurrentPageIndex;
		}
		location = ref; 
		return;
    }

    function GetPhotoSetList(user_id)
    {
        if (m_bGetNotInSetInfo)
        {
            GetNotInSets(1);
            return;
        }
        var xmlHttp;
        try
        {    // Firefox, Opera 8.0+, Safari 
            xmlHttp = new XMLHttpRequest();
        }
        catch (e)
        {    // Internet Explorer
            try
            {
                xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
            }
            catch (e)
            {
                try
                {
                    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
                }
                catch (e)
                {
                    alert("Your browser does not support AJAX!");
                    return false;
                }
            }
        }

        //define async response handler
        xmlHttp.onreadystatechange = function()
        {
            if (xmlHttp.readyState == 4)
            {
                if (xmlHttp.responseText)
                    var myObject = eval('(' + xmlHttp.responseText + ')');
            }
        }

        var strSrc = m_strSecret + "api_key" + m_strApiKey + "auth_token" + m_strToken + "formatjson" + "methodflickr.photosets.getList";
        if (user_id)
            strSrc = strSrc + "user_id" + user_id;
        var strMd5 = MD5(strSrc);
        var strRequest = "http://api.flickr.com/services/rest/?method=flickr.photosets.getList&api_key=" + m_strApiKey;
        if (user_id)
            strRequest = strRequest + "&user_id=" + user_id;
        strRequest = strRequest + "&api_sig=" + strMd5 + "&auth_token=" + m_strToken + "&format=json";

        xmlHttp.open("GET", strRequest, true);
        xmlHttp.send(null);
    }
	
	function ShowPhotos(photos)
	{
	    m_bShowPhotoSet = false;

	    if (m_bGetNotInSetInfo)
	    {
	        if (photos.photo.length > 0)
		    {
		        var photo = photos.photo[0];
		        m_bHaveNotInSetPhotos = true;
		        m_strNotInSetThumbnailUrl = "http://farm" + photo.farm + ".static.flickr.com/" + photo.server + "/" + photo.id + "_" + photo.secret + "_s.jpg";
		        m_nNotInSetPhotoCount = photos.total;
		    }
		    m_bGetNotInSetInfo = false;
		    GetPhotoSetList(null);
		    return;
		}
		    
		UpdateTotalPageInfo();
		UpdateCurPageInfo();
		nPhotoNum = photos.photo.length;
		
		// insert newly found pictures
		var body = document.getElementById("resultArea");
		body.innerHTML = "";
		var tbl     = document.createElement("table");
		var tblBody = document.createElement("tbody");
		var nCount = 0;
		var row = document.createElement("tr");

		for (var i = 0; i < photos.photo.length; i++) 
		{
			if(nCount>m_nPhotosInWidth-1)
			{
				nCount = 0;
				row = document.createElement("tr");
			}
			nCount++;
			
			var cell = document.createElement("td");
			cell.setAttribute("width","100");
			var tbl_new     = document.createElement("table");
			tbl_new.setAttribute('cellspacing','0');
			tbl_new.setAttribute('cellpadding','0');
			var tblBody_new = document.createElement("tbody");
			tbl_new.setAttribute('border','0');
			
			
			var rowIcon = document.createElement("tr");
			var cellIcon = document.createElement("td");
			cellIcon.setAttribute('align','center');
			cellIcon.colSpan = 2;
			
			var photo = photos.photo[i];
			var link = document.createElement('a');
			var urlLarge = "add:"+photo.id;
			
			var strOwner = m_strCurrent_person_id;
			var urlLink = "http://www.flickr.com/photos/"+strOwner+"/"+photo.id+"/";
			
			link.setAttribute('target', "_BLANK");
			link.setAttribute('href', urlLink);
			
			var div = document.createElement('img');
			var url = "http://farm" + photo.farm + ".static.flickr.com/" + photo.server + "/" + photo.id + "_" + photo.secret + "_s.jpg";
			
			strPhotoUrl = urlLarge;
			var SpaceID = "image"+photo.id;
			div.setAttribute('src', url);
			div.setAttribute('border', 0);
			div.setAttribute('id', SpaceID);
			div.setAttribute('photo_id',photo.id);
			div.setAttribute('title',"");
			
			div.onclick = function()
			{
				
				GetPhotoSizes(this.photo_id);
			}
			
			div.onmouseover = function()
			{
				this.style.cursor= 'hand';
				if(this.title=="")
					GetPhotoInfo(this.photo_id);
			}
			
			div.onmouseout=function()
			{
				this.style.cursor= 'default';
			}
			
				
			
			link.appendChild(div);
			cellIcon.appendChild(link);
			rowIcon.appendChild(cellIcon);

			
			var rowButton = document.createElement("tr");
			var cellButton1 = document.createElement("td");
			cellButton1.setAttribute('align', "left");
			cellButton1.setAttribute('width', "20");
			
			var checkBox_select = document.createElement('input');
			checkBox_select.setAttribute('type', "checkbox");
			
			var strID = "image"+ i;
			checkBox_select.setAttribute('id', strID);
			checkBox_select.setAttribute('photo_id', photo.id);
			checkBox_select.setAttribute('href', urlLarge);
			checkBox_select.setAttribute('photo_title', photo.title);
			if(m_htPhotoID.contains(photo.id))
			{
				checkBox_select.defaultChecked = true;
			}
			checkBox_select.onclick = function()
			{
				OnCheckBox(this.photo_id,this.photo_title,this.checked);
			}
			
			cellButton1.appendChild(checkBox_select);
			
			var cellButton2 = document.createElement("td");
			cellButton2.setAttribute('align', "right");
			
			var button_License = document.createElement('img');
			var strLogoPath = "";
			if(photo.license == 0)
				strLogoPath = m_strSkinPath+ "btn_c_n.png";
			else
				strLogoPath = m_strSkinPath+ "btn_copyright_n.png";
				
			button_License.setAttribute('src', strLogoPath);
			
			button_License.setAttribute('licenseID', photo.license);
			button_License.setAttribute('title',GetLicenseDescription(photo.license));
			button_License.onclick = function()
			{
				var strLogoPath = "";
				if(this.licenseID == 0)
					strLogoPath = m_strSkinPath+ "btn_c_n.png";
				else
					strLogoPath = m_strSkinPath+ "btn_copyright_p.png";
				this.src = strLogoPath;
				OpenToLicensePage(this.licenseID);
			}
			
			button_License.onmouseover = function()
			{
				var strLogoPath = "";
				if(this.licenseID == 0)
					strLogoPath = m_strSkinPath+ "btn_c_n.png";
				else
				{
					strLogoPath = m_strSkinPath+ "btn_copyright_h.png";
					this.style.cursor= 'hand';
				}

				this.src = strLogoPath;
				
			}
			
			button_License.onmouseout = function()
			{
				var strLogoPath = "";
				if(this.licenseID == 0)
					strLogoPath = m_strSkinPath+ "btn_c_n.png";
				else
					strLogoPath = m_strSkinPath+ "btn_copyright_n.png";
				this.src = strLogoPath;
			}
			
			cellButton2.appendChild(button_License);
			
			rowButton.appendChild(cellButton1);
			rowButton.appendChild(cellButton2);
			
			
			
			tblBody_new.appendChild(rowIcon);
			tblBody_new.appendChild(rowButton);
			
			tbl_new.appendChild(tblBody_new);
			
			cell.appendChild(tbl_new);
			
			
			row.appendChild(cell);
			tblBody.appendChild(row);	
		}
		tbl.appendChild(tblBody);
		body.appendChild(tbl);
		tbl.setAttribute("border", "0");
		
		UpdateSelectAllButtonStatus();
		UpdateUpLevelButtonStatus(true);
		return;
	}
	
	
	function jsonFlickrApi(rsp)
	{
		if (rsp.stat != "ok")
		{
			return;
		}
		
		if(rsp.photosets)
		{
			ShowPhotoSets(rsp.photosets);
			return;
		}
		
		if(rsp.sizes)
		{
			var strURL = "";
			var bFind = false;
			for(var i = 0;i<rsp.sizes.size.length;i++)
			{
				strURL = rsp.sizes.size[i].source;
				bFind = true;
				if(rsp.sizes.size[i].label == m_nDownloadSizeName)
				{
					break;
				}
			}
			if(bFind)
			{
				var strPhotoURL = "GetPhotoURL:"+strURL;
				location = strPhotoURL;
			}
			return;
		}
		
		if(rsp.person)
		{
			ShowPersonsInfoArea(rsp.person);	
			return;
		}
		
		if(rsp.frob)
		{
			var strReturn = "frob:"+rsp.frob._content;
			strFrob = rsp.frob._content;
			
			m_strFrob = strFrob;
			var ref = "Frob:"+m_strFrob;
			location = ref;
				
			var strSrc = m_strSecret+"api_key"+m_strApiKey+"frob"+strFrob+"permsread";
			var strMd5 = MD5(strSrc);
			var strRequest = "http://www.flickr.com/services/auth/?api_key="+m_strApiKey+"&perms=read&frob="+strFrob+"&api_sig="+strMd5;

			window.open( strRequest);
			return;
		}
		
		if(rsp.auth)
		{
			if(rsp.auth.token)
			{
				m_strToken = rsp.auth.token._content;
				GetNotInSets(1);
				var ref = "token:"+m_strToken;
				location = ref;
				return;
			}
		}

		if (rsp.photos)
		{
		    m_nTotalPageNum = rsp.photos.pages;
			ShowPhotos(rsp.photos);
			return;
		}
		
		if(rsp.licenses)
		{
			for(var j = 0;i<10;j++)
			{
				m_nLicenseID[j] = -1;
			}	
			for(var i = 0;i<rsp.licenses.license.length;i++)
			{
				strURL = rsp.licenses.license[i].url;
				m_nLicenseName[i] = rsp.licenses.license[i].name; 
				m_nLicenseURL[i] = rsp.licenses.license[i].url;
				m_nLicenseID[i] = rsp.licenses.license[i].id;				
			}
			return;
		}
		
		if(rsp.photoset!=null)
		{
			m_nTotalPageNum = rsp.photoset.pages;
			ShowPhotos(rsp.photoset);
			return;
		}
		if(rsp.user)
		{
			m_strCurrent_person_id = rsp.user.nsid;
			updateTableWH();
			getPersonInfo(rsp.user.nsid);
			return;
		}
		
		if(rsp.photo)
		{
			ShowPhotoInfo(rsp.photo);
			return;
		}
		
	}
	
	
	</script>
	
	<style type="text/css">
	<!--
	body {
		margin: 0px;
		padding: 0px;
	}
	-->
	</style>
	
	
	 <head>
		<style>
			body {color:white;}
		</style>
	</head>
	
	<body scroll="no" id="bkArea">
		<font face ="Segoe UI">
		<form name="myForm">
			<table width="480" height="100%" align="left" VALIGN="top" ID="Table2" border="0">
				<tr>
					<td VALIGN="top">
						<div id="resultArea" style="OVERFLOW-Y: scroll; SCROLLBAR-FACE-COLOR: #e7e7e7; SCROLLBAR-3DLIGHT-COLOR: #e7e7e7">
						</div>
					</td>
				</tr>
			</table>
			<table width="161" height="100%" align="right" ID="Table1" border="0">
				<tr>
					<td VALIGN="middle" height="100" align="center">
						<div id="Info_Area1" style="OVERFLOW-Y: scroll; SCROLLBAR-FACE-COLOR: #e7e7e7; SCROLLBAR-3DLIGHT-COLOR: #e7e7e7">
						</div>
					</td>
				</tr>
				<tr>
					<td VALIGN="middle" height="100" align="center">
						<div id="Info_Area2" style="OVERFLOW-Y: scroll; SCROLLBAR-FACE-COLOR: #e7e7e7; SCROLLBAR-3DLIGHT-COLOR: #e7e7e7">
						</div>
					</td>
				</tr>
			</table>
		</form>
		</font>
	</body>
</html>