officialPath = "http://www.christinamultimedia.com/archivedownload.php?site=resource&file=WMAs/";
unofficialPath = "http://www.christinamultimedia.com/archivedownload.php?site=resource&file=mp3s/";
videoPath = "http://www.christinamultimedia.com/archivedownload.php?site=resource&file=mpg_remixes/";

offline = false;
count = 0;

function ConfirmAction(alert, link) {
if (confirm(alert)) location.href = link;
}

function officialRemix(file,name) {
this.file = file;
this.name = name;
}

function unofficialRemix(file,name,type,rate,bitrate) {
this.file = file;
this.name = name;
this.type = type;
this.rate = rate;
this.bitrate = bitrate;
}

function videoRemix(file,name,time,mixer,size) {
this.file = file;
this.name = name;
this.time = time;
this.mixer = mixer;
this.size = size;
}

function newRemix(file,name) {
this.file = file;
this.name = name;
}

function startTable(name) {
title = name;
tempArray = new Array();
tempcount = 0;
}

function startOfficialTable(name) {
startTable(name);
}

function startUnofficialTable(name) {
startTable(name);
}

function startVideoTable(name) {
startTable(name);
}

function addOfficial(file,name) {
tempcount++;
tempArray[tempcount] = new officialRemix(file,name);
}

function addUnofficial(file,name,type,rate,bitrate) {
tempcount++;
tempArray[tempcount] = new unofficialRemix(file,name,type,rate,bitrate);
}

function addVideo(file,name,type,rate,bitrate) {
tempcount++;
tempArray[tempcount] = new videoRemix(file,name,type,rate,bitrate);
}

function linkText(pathtype) {
if (offline) document.write("<FONT face=Arial color=#ffffff size=1>"+tempArray[i].name+"</FONT>");
else document.write("<A href=\""+pathtype+tempArray[i].file+"\">"+tempArray[i].name+"</A>");
}

function endOfficialTable() {
count += tempcount;;
document.write("<table class=\"bordercolor\" align=\"center\" cellSpacing=0 cellPadding=1 width=\"100%\"><tr><td width=\"100%\" class=\"tableheader\"><b>"+title+" ("+tempcount+")</b></td></tr>");
for (i=1;i<=tempcount;i++) {
document.write("<tr><td class=\"tablebody\">");
linkText(officialPath);
document.write("</td></tr>"); }
document.write("</table><br>");
}

function endUnofficialTable() {
count += tempcount;;
document.write("<table class=\"bordercolor\" align=\"center\" cellSpacing=0 cellPadding=1 width=\"100%\"><tr><td width=\"60%\" class=\"tableheader\"><b>"+title+" ("+tempcount+")</b></td><td width=\"23%\" class=\"tableheader\" align=\"center\">Type of Mix</td><td width=\"7%\" class=\"tableheader\" align=\"center\">Rating</td><td width=\"10%\" class=\"tableheader\" align=\"center\">Bitrate</td></tr>");
for (i=1;i<=tempcount;i++) {
document.write("<tr><td class=\"tablebody\">");
linkText(unofficialPath);
document.write("</td><td class=\"tablebody\" align=\"center\">"+tempArray[i].type+"</td><td class=\"tablebody\" align=\"center\">"+tempArray[i].rate+"</td><td class=\"tablebody\" align=\"center\">"+tempArray[i].bitrate+"</td></tr>"); }
document.write("</table><br>"); 
}

function endVideoTable() {
count += tempcount;;
document.write("<table class=\"bordercolor\" align=\"center\" cellSpacing=0 cellPadding=1 width=\"100%\"><tr><td width=\"60%\" class=\"tableheader\"><b>"+title+" ("+tempcount+")</b></td><td width=\"7%\" class=\"tableheader\" align=\"center\">Time</td><td width=\"23%\" class=\"tableheader\" align=\"center\">Producer / Video DJ Mixer</td><td width=\"10%\" class=\"tableheader\" align=\"center\">Size</td></tr>");
for (i=1;i<=tempcount;i++) {
document.write("<tr><td class=\"tablebody\">");
linkText(videoPath);
document.write("</td><td class=\"tablebody\" align=\"center\">"+tempArray[i].time+"</td><td class=\"tablebody\" align=\"center\">"+tempArray[i].mixer+"</td><td class=\"tablebody\" align=\"center\">"+tempArray[i].size+"</td></tr>"); }
document.write("</table><br>");
}

function displayTotal(remixtype) {
document.write("<table class=\"bordercolor\" cellSpacing=0 cellPadding=1 width=\"45%\"><tr><td width=\"20%\" class=\"tableheader\"><b>Total:</b></td><td width=\"80%\" class=\"tableheader\"><b>&nbsp;"+count+"&nbsp;"+remixtype+"&nbsp;Remixes</b></td></tr></table>");
}