function mouseOver_js(obj,sxid){
if(obj){
eval("var x = " + obj);
$('#coverList_wait' + sxid).html(''+x.title+'');
$('#coverList_wait' + sxid).show();
}
}
function mouseClick_js(obj,sxid){
if(obj){
eval("var x = " + obj);
if(x.link_url.length!=0){
switch(x.link_target){
case '0':
window.location.href=''+x.link_url+'';
break;
case '1':
window.open(''+x.link_url+'','_blank');
break;
case '2':
window.open(''+x.link_url+'','_blank','fullscreen=no,channelmode=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width='+window.screen.width+',height='+window.screen.width+',left=0,top=0');
break;
}
}
}
}
function dosend1(){
var x1='';
x1 = $('#email').val();
if(x1=='請輸入email'){
alert('請輸入email');
}else{
$.ajax({
type: "POST",
url: "ajax/dosave1.asp",
cache: false,
data: {
x1:''+x1+''
},
success: function(msg){
msg = ReplaceAll(msg,'
', '\n');
if(msg=='OK'){
alert('存檔成功');
$('#email').val('請輸入email');
}else{
alert(msg);
}
},
error: function(msg){
alert( "伺服器忙線中請稍後再試..." );
}
});
}
}
function dosend2(){
$.ajax({
type: "POST",
url: "ajax/dosave2.asp",
cache: false,
data: {
IP_SNAME:''+$('#IP_SNAME').val()+'',
//IP_SNO:''+$('#IP_SNO').val()+'',
//IP_MAJOR:''+$('#IP_MAJOR').val()+'',
IP_EMAIL:''+$('#IP_EMAIL').val()+''
},
success: function(msg){
msg = ReplaceAll(msg,'
', '\n');
if(msg=='OK'){
alert('存檔成功');
$('#IP_SNAME').val('');
//$('#IP_SNO').val('');
//$('#IP_MAJOR').val('');
$('#IP_EMAIL').val('');
}else{
alert(msg);
}
},
error: function(msg){
alert( "伺服器忙線中請稍後再試..." );
}
});
}
function ReplaceAll(strOrg, strFind, strReplace) {
var index = 0;
while (strOrg.indexOf(strFind, index) != -1) {
strOrg = strOrg.replace(strFind, strReplace);
index = strOrg.indexOf(strFind, index);
}
return strOrg
}
function anteaterAddFavorites() {
var _title = document.title;
var _locationHref = window.location.href;
if( window.sidebar && window.sidebar.addPanel ) {
// Gecko (Netscape 6)
window.sidebar.addPanel( _title, _locationHref, '' );
} else if( window.external ) {
// IE
window.external.AddFavorite( _locationHref, _title );
} else if( document.layers ) {
// NS4
window.alert( 'Please click OK then press Ctrl+D to create a bookmark' );
} else {
// Other browsers
window.alert( 'Please use your browsers\' bookmarking facility to create a bookmark' );
}
}
function show_bookstore_normal(sxid,sitemid,spage){
$.ajax({
type: "POST",
url: "cover_data.asp",
cache: false,
data: {
PAGE:''+spage+'',
PAGE_SIZE:'6',
STOREID:''+sxid+'',
ITEMID:''+sitemid+''
},
dataType:"xml",
success: function(xml){
var tp = $('data',xml).attr('total_page');
if(tp>0){
var s = '';
s = s + '
| ';
if(slink_url.length!=0){
switch(slink_target){
case '0':
s = s + '';
break;
case '1':
s = s + '';
break;
case '2':
s = s + '';
break;
}
}
s = s + ' '+stitle+' | ';
j = j + 1
});
if(j<6){
for(var i=j;i<6;i++){
s = s + ' '; } } s = s + ' |