﻿//CUSTOM SCRIPTS FOR PREPAY TECHNOLOGIES
// COPYRIGHT HEADCHANNEL LTD


//Functions to create popUp windows to link to secure site

var splashLinkApply = "https://portal.prepaytec.com/chopinweb/scareStart.do?customerCode=1618516125&pcgCode=PREPAY_SPLASHV2&start=WL&style=application&loc=en"
var premLinkApply = "http://portal.prepaytec.com/chopinweb/start.do?customerCode=1618516125&pcgCode=PREPAY_PREMIUM";
var quidLinkApply = "http://portal.prepaytec.com/utmredirect.htm?quidityApply"
var quidRecordLinkApply = "http://portal.prepaytec.com/utmredirect.htm?quidityRecordApply"
var quidMirrorLinkApply = "http://portal.prepaytec.com/utmredirect.htm?quidityMirrorApply"
var quidSundayMailLinkApply = "https://portal.prepaytec.com/chopinweb/scareStart.do?customerCode=1618516125&pcgCode=PREPAY_QUIDITYV3&start=PD&style=application"
var splashLinkAccount = "https://portal.prepaytec.com/chopinweb/scareMyLogin.do?customerCode=1618516125&loc=en";
var premLinkAccount = "https://portal.prepaytec.com/chopinweb/scareMyLogin.do?customerCode=1618516125&loc=en";
var quidLinkAccount = "https://portal.prepaytec.com/chopinweb/scareMyLogin.do?customerCode=1618516125&loc=en";
var allLinkAccount = "https://portal.prepaytec.com/chopinweb/scareMyLogin.do?customerCode=1618516125&loc=en";


function applyNow(card) {

if (card == "splash") {
myLink = splashLinkApply;
}
if (card == "prem") {
myLink = premLinkApply;
}
if (card == "quidity") {
myLink = quidLinkApply;
}
if (card == "quidityRecordApply") {
myLink = quidRecordLinkApply;
}
if (card == "quidityMirrorApply") {
myLink = quidMirrorLinkApply;
}
if (card == "quiditySundayMailApply") {
myLink = quidSundayMailLinkApply;
}

testwindow = window.open(myLink,"image","location=0,status=0,toolbar=0,menubar=0,directories=0,scrollbars=1,resizable=1,width=900,height=800");
testwindow.moveTo(0,0);
}

function myAccount(card) {


if (card == "all") {
openWindow(allLinkAccount);
}

if (card == "splash") {
openWindow(splashLinkAccount);
}
if (card == "prem") {
openWindow(premLinkAccount);
}

if (card == "quidity") {
openWindow(quidLinkAccount);
}

}

function barCode(card) {
var myBarCode;
myBarCode = "barcode.html"
testwindow = window.open(myBarCode, "image", "location=0,status=0,toolbar=0,menubar=0,directories=0,scrollbars=1,resizable=1,width=575,height=525");
testwindow.moveTo(0,0);
}


//test!
function messagebox(message) {
alert (message)
}

//create non-crawlable email addresses
var bongle = "mail";
var this_site = "360money.com";
function sendmail(myVariable) {
var myLink = myVariable + '@' + this_site;
document.write('<a href=\"' + bongle + 'to:' + myLink + '\">' + myLink + '</a>');
}
function sendmail_fullstop(myVariable) {
var myLink = myVariable + '@' + this_site;
document.write('<a href=\"' + bongle + 'to:' + myLink + '\">' + myLink + '</a>.');
}

function sendExternalMail(myVariable, domain) {
var myLink = myVariable + '@' + domain;
document.write('<a href=\"' + bongle + 'to:' + myLink + '\">' + myLink + '</a>');
}


//call javascript commands from within Flash

function applynowmovie_DoFScommand (command, args) {
	alert (args);
}
function openWindow(url) {
        exampleWin = window.open(url, 'MyAccount', 'width=830, height=500, resizable=yes, scrollbars=yes, location=no, directories=no, status=no, menubar=no, toolbar=no, copyhistory=no');

    }
