/**
 * for index.php
 * require JQuery 1.3.2 or later
 * 
 * 2009-06-04 by Escape
 *
 */

$().ready(function(){
	var so = new SWFObject("i/wall.swf", "sotester", "620", "290", "9");
	so.write("flashcontent2");	
});
 
function getNewPhoto(type,act){
	if( act == '' || type == ''){ return false; }
	if( type == 'new' ){
		var div = $("#new-photo");
	}else if( type == 'select' ){
		var div = $("#select-photo");
	}
	
	$.ajax({
		type: "POST",
		url: "async_newPhoto.php",
		data: "act="+act+"&type="+type,
		dataType: 'json',
		beforeSend:function(){
			div.block({ message: 'Please wait' }); 
		},
		complete:function(){
			div.unblock();
		},
		error:function(){
			alert("很抱歉，伺服器忙碌中請稍後再試，謝謝!!");
		},
		success: function(data){
			if(data.status == 'ok'){														
				div.html(data.html);
			}else{
				alert(data.msg);
			}
		}
	});
}