Jovane's Homepage
';
var x = new sack();
x.requestFile = '/gift/detail';
x.method = 'GET';
x.setVar('giver_id', itemSelected.gifting.giver_id);
x.setVar('created_at', itemSelected.gifting.created_at);
x.setVar('name', itemSelected.gifting.good.name);
x.setVar('media_type', itemSelected.gifting.good.media_type);
x.setVar('media_url', itemSelected.gifting.good.media_url);
x.onCompletion = function() { showGiftResp(x) };
x.onError = function() { showGiftError(x) };
x.runAJAX();
}
function showGiftResp(x){
document.getElementById("single_gift").innerHTML = x.response;
}
function makePurchase(theItem){
viximo.components.view('giftings', {type: 'preview', page: 'HappyHappyGirl91/journals'});
var x = new sack();
x.requestFile = '/gift/buy';
x.method = 'GET';
x.setVar('cash_currency_price', theItem.cash_currency_price);
x.setVar('viximo_id', theItem.id);
x.setVar('viximo_name', theItem.name);
x.setVar('preview_thumb_url', theItem.preview_thumb_url);
x.setVar('receiver_id', 3777932);
x.onCompletion = function() { buyResp(x) };
x.onError = function() { buyError(x) };
x.runAJAX();
}
function buyError(x) {
alert(ZORPIA_JS_LANG.MESSAGE_SYSTEM_ERROR);
}
function buyResp(x) {
var result=x.response.split(',');
switch(result[0]) {
case 'OK': /* MORE here */
alert(ZORPIA_JS_LANG.GIFT_OK);
toggle_setting2('gifts');
viximo.calltoaction.convert('homepage_lightbox');
window.location = '/messages/compose/to=' + 'HappyHappyGirl91' + '/txn_id=' + result[1] + '/media_type=' + result[2] + '/media_url=' + result[3];
// window.location.reload(true);
break;
case 'BALANCE_LESS': /* MORE here */
alert(ZORPIA_JS_LANG.BALANCE_LESS);
window.location = '/payment/zorpia_dollar?from_hp=1';
break;
case 'NOT_LOGINED':
alert(ZORPIA_JS_LANG.NOT_LOGINED);
window.location = '/login?goto=' + document.location.search || document.location.href + '?open_store=1';
break;
case 'SERVER_ERROR':
alert(ZORPIA_JS_LANG.MESSAGE_SYSTEM_ERROR);
break;
case 'BAD_REQUEST':
alert('ZORPIA_JS_LANG.BAD_REQUEST');
break;
default:
alert(ZORPIA_JS_LANG.MESSAGE_SYSTEM_ERROR);
}
}
function toggle_setting2(editBlock){
var bg = document.getElementById("popupBg");
var wrap = document.getElementById(editBlock+"_wrap");
wrap.style.visibility = "visible";
var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=b_version.split(";");
var trim_Version=version[1].replace(/[ ]/g,"");
// if (trim_Version=="MSIE7.0" || trim_Version=="MSIE6.0"){
// is_ie6_7 = 1;
// }else{
// $('#pop_top').addClass('popTop');
// $('#pop_middle').addClass('pop_conWrap');
// $('#pop_bottom').addClass('popBottom');
// }
if(bg.style.display == "none"){
bg.style.display = "block";
wrap.style.display = "block";
bg.style.height = document.body.scrollHeight + "px";
if(is_ie6){
wrap.style.top = document.body.scrollTop + 80 + "px";
}
if (editBlock=="gifts"){
viximo.calltoaction.convert('homepage_send_gift');
viximo.calltoaction.view('homepage_lightbox');
}
}else{
bg.style.display = "none";
wrap.style.display = "none";
document.getElementById("single_gift").innerHTML = '';
}
}
function loadIframe(iframeName) {
var url = '/viximo/viximo_store.html';
if ( window.frames[iframeName] ) {
window.frames[iframeName].location = url;
return false;
}
return true;
}