allowchange = 1
titletxt = ""
var anc = "";
function document_location_anchor(anchorname)
{
stl = document.location + "";
stl = stl.split("#");
stl = stl[0]
// If there's a base tag, include the whole URL in the redirect.
// Otherwise, only do the basic anchorname.
var theBase = document.getElementsByTagName("base");
if (theBase.length)
{
setloc = stl + "#" + anchorname;
}
else
{
setloc = "#" + anchorname;
}
if (anc != setloc)
{
if (!navigator.userAgent.match(/iPhone/i) && !navigator.userAgent.match(/iPad/i))
{
// Don't scroll to the top if galleryautoplay is set to 1
uscroll = 0;
if (!isdefined('flashvar_arr'))
{
uscroll = 1;
}
else if (flashvar_arr["galleryautoplay"] == "0")
{
uscroll = 0;
}
if (uscroll == 1)
{
$('html,body').animate({scrollTop: $(".full_photo_wrapper").offset().top},'slow');
}
}
document.location = setloc;
anc = setloc;
}
return;
}
function isdefined( variable)
{
return (typeof(window[variable]) == "undefined")? false: true;
}
function changevote(v)
{
if (allowchange == 0)
{
return
}
for (i = 1; i <= 5; i++)
{
fr = document.getElementById("vote_" + i)
src = ""
if (v == ((i - 1) * 2) + 1)
{
src = "-half2.gif"
}
else if (v < (i * 2))
{
src = "-faded2.gif"
}
else
{
src = "2.gif"
}
fr.src = "images/icons/star" + src
}
}
function changevote2(v)
{
if (allowchange == 0)
{
return
}
for (i = 1; i <= 5; i++)
{
fr = document.getElementById("vote_" + i)
src = ""
if (v == ((i - 1) * 2) + 1)
{
src = "-half2.gif"
}
else if (v < (i * 2))
{
src = "-faded2.gif"
}
else
{
src = "2.gif"
}
fr.src = "images/icons/star" + src
}
}
function dovote(v, id, type)
{
if (allowchange == 0)
{
return
}
if (window.XMLHttpRequest)
{
// If IE7, Mozilla, Safari, etc: Use native object
var http = new XMLHttpRequest()
}
else
{
if (window.ActiveXObject)
{
// ...otherwise, use the ActiveX control for IE5.x and IE6
var http = new ActiveXObject("Microsoft.XMLHTTP");
}
}
var url = "vote.php"
var params = "contentgroup=" +id+ "&vote=" + v + "&type=" + type + "&ajax=1"
http.open("GET", url+"?"+params, true);
http.onreadystatechange = function()
{
if(http.readyState == 4 && http.status == 200)
{
if (http.responseText == "done")
{
alert("Thank you for rating this update.");
changevote(v)
allowchange= 0
}
else
{
alert("There was an error recording your vote. Please try again later");
}
}
}
http.send(null);
}
function domodelvote(v, id)
{
if (allowchange == 0)
{
return
}
if (window.XMLHttpRequest)
{
// If IE7, Mozilla, Safari, etc: Use native object
var http = new XMLHttpRequest()
}
else
{
if (window.ActiveXObject)
{
// ...otherwise, use the ActiveX control for IE5.x and IE6
var http = new ActiveXObject("Microsoft.XMLHTTP");
}
}
var url = "vote.php"
var params = "set=" +id+ "&vote=" + v + "&ajax=1"
http.open("GET", url+"?"+params, true);
http.onreadystatechange = function()
{
if(http.readyState == 4 && http.status == 200)
{
if (http.responseText == "done")
{
alert("Thank you for rating this model.");
changevote2(v)
allowchange= 0
}
else
{
alert("There was an error recording your vote. Please try again later");
}
}
}
http.send(null);
}
function dodvdvote(v, id)
{
if (allowchange == 0)
{
return
}
if (window.XMLHttpRequest)
{
// If IE7, Mozilla, Safari, etc: Use native object
var http = new XMLHttpRequest()
}
else
{
if (window.ActiveXObject)
{
// ...otherwise, use the ActiveX control for IE5.x and IE6
var http = new ActiveXObject("Microsoft.XMLHTTP");
}
}
var url = "vote.php"
var params = "dvd=" +id+ "&vote=" + v + "&ajax=1"
http.open("GET", url+"?"+params, true);
http.onreadystatechange = function()
{
if(http.readyState == 4 && http.status == 200)
{
if (http.responseText == "done")
{
alert("Thank you for rating this DVD.");
changevote2(v)
allowchange= 0
}
else
{
alert("There was an error recording your vote. Please try again later");
}
}
}
http.send(null);
}
function jsgallery(cg, id, fid, settype, mt)
{
var url="";
try
{
base = document.getElementsByTagName('base')[0].getAttribute('href')
}
catch(e)
{
base = "";
}
var url = base + "image.php?cg=" + cg + "&type=" + settype + "&id=" + fid
if (mt != "")
{
url = url + "&mt=" + mt
}
url = url + "#id=" + id
document.location = url
return false
}
function retPicarr(picarr, id)
{
for(i = 0; i < picarr.length; i++)
{
if (picarr[i][0] == id)
{
return picarr[i]
}
}
}
function RenderImg(picarr, id, divv)
{
var poss = 0;
dv = document.getElementById(divv)
id = id + "";
if ( id.indexOf(":index") != -1 )
{
id = id.replace(":index", "");
i = id;
imgg = picarr[i][1]
wdth = picarr[i][2]
hdth = parseInt(picarr[i][3]) + 75
movtype = picarr[i][4]
movname= picarr[i][5]
poss = i
}
else
{
for(i = 0; i < picarr.length; i++)
{
if (picarr[i][0] == id)
{
imgg = picarr[i][1]
wdth = picarr[i][2]
hdth = parseInt(picarr[i][3]) + 75
movtype = picarr[i][4]
movname= picarr[i][5]
poss = i
}
}
}
if (dv == undefined)
{
return true
}
noman = document.getElementById("nomansland")
var dot = imgg.lastIndexOf(".");
var extt = imgg.substr(dot,imgg.length);
if (!isdefined("movtype"))
{
movtype = ""
}
if (!isdefined("movname"))
{
movname = ""
}
if (!isdefined("username"))
{
username = ""
}
if ((movname.indexOf("264") != -1) || (extt == ".mov") || (extt == ".mp4"))
{
ua = (navigator.userAgent + "").toLowerCase();
// If the user agent has any of these strings, automatically use the HTML5 player.
strmtch = ["iphone", "ipad", "android", "andriod", "silk", "kindle"];
html5load = 0;
for(i = 0; i < strmtch.length; i++)
{
if (ua.indexOf(strmtch[i]) != -1)
{
html5load = 1;
}
}
// Otherwise, detect to see if flash is present. If it is present, don't use the HTML5 player.
// If it's not present, use the HTML5 player.
if (html5load == 0)
{
major = 9;
var v;
if (navigator.plugins && navigator.plugins.length > 0) {
var type = 'application/x-shockwave-flash';
var mimeTypes = navigator.mimeTypes;
if (mimeTypes && mimeTypes[type] && mimeTypes[type].enabledPlugin && mimeTypes[type].enabledPlugin.description) {
v = mimeTypes[type].enabledPlugin.description.replace(/^.*?([0-9]+)\.([0-9])+.*$/, '$1,$2').split(',');
}
}
else {
var flashObj = null;
try { flashObj = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); } catch (ex) { html5load = 1; }
if (flashObj != null) {
var fV;
try { fV = flashObj.GetVariable("$version"); } catch (err) { html5load = 1; }
v = fV.replace(/^.*?([0-9]+,[0-9]+).*$/, '$1').split(',');
}
}
if (v)
{
var majorVersion = parseInt(v[0], 10);
if (major >= majorVersion)
{
html5load = 1;
}
}
else
{
html5load = 1;
}
// Test to see if the HTML5 player can load an mp4 file.
// If it can't, don't use the VIDEO element.
}
if (html5load == 1)
{
var testEl = document.createElement( "video" );
if ( testEl.canPlayType )
{
canplay = "" !== ( testEl.canPlayType('video/mp4;') );
}
else
{
html5load = 0; // Device can't load the mp4 video. Prompt for the flash player download.
}
if (!canplay)
{
html5load = 0; // Device can't load the mp4 video. Prompt for the flash player download.
}
}
if (html5load == 1)
{
hdth = hdth - 75
if (wdth > 980)
{
hdth = hdth * (980) / wdth;
wdth = 980;
}
inht = ''
inht += ''
}
else
{
hdth = hdth - 60
inht = ''
inht += ' '
}
dv.innerHTML = inht
}
else if ((movname.indexOf("divx") != -1) || (movname.indexOf("xvid") != -1))
{
hdth = hdth - 55
dc1 = document.location + ''
dc = dc1.substring(7, dc1.indexOf('/',7)+1)
dc = dc1.substr(0, 7) + dc;
// Code to make sure videos work on strongbox.
sbsession = getCookie("sbsession")
if (sbsession != "")
{
sbsession = sbsession.split("&");
sbsession = sbsession[0]
if(dc.indexOf(sbsession) == -1)
{
if (dc.indexOf("www.") == -1)
{
dc = dc.replace("http://", "http://" + sbsession + ".")
}
else
{
dc = dc.replace("http://www.", "http://" + sbsession + ".")
}
}
}
else if(username != "")
{
dc = dc.replace("http://", "http://" + username + ":" + password + "@")
}
imgg = dc + imgg
inht = ""
inht += ''
inht += '
No video? Get the DivX Web Player for Windows or '
inht += 'Mac
'
dv.innerHTML = inht
}
else if ((extt == ".rm") || (extt == ".rmvb"))
{
inht = ""
dc1 = document.location + ''
dc = dc1.substring(7, dc1.indexOf('/',7)+1)
dc = dc1.substr(0, 7) + dc;
imgg = dc + imgg
inht += '
'
inht += ''
dv.innerHTML = inht
}
else if (noman == undefined)
{
imageObj = null
var imageObj = new Image();
imageObj.src = imgg;
if (isNaN(hdth))
{
hdth = imageObj.height;
if (hdth == 0)
{
hdth = 1024
}
}
else
{
hdth = hdth - 75;
}
if (isNaN(wdth))
{
wdth = imageObj.width;
if (wdth == 0)
{
wdth = 1024
}
}
htm = ""
htm = htm + '';
htm = htm + ''
htm = htm + "";
$("#" + divv).css("height", hdth + "px");
$("#" + divv).css("width", wdth + "px");
$("#" + divv).css("opacity", 0);
// $("#" + divv).hide();
$(imageObj)
.load(function () {
dv.innerHTML = htm
$("#" + divv).animate({
opacity: 1.0
}, 200);
})
.ready(function () {
dv.innerHTML = htm
$("#" + divv).animate({
opacity: 1.0
}, 200);
})
var imageOcache = []
var num_images_precache = 5;
pas2 = Math.min(picarr.length, poss + num_images_precache);
pas2 = Math.max(0, pas2);
for(i = poss; i < pas2; i++)
{
imageOcache[i] = new Image();
imageOcache[i].src = picarr[i][1];
}
//, function() {
// // Animation complete.
// }
}
else
{
inht = ""
dc1 = document.location + ''
dc = dc1.substring(7, dc1.indexOf('/',7)+1)
dc = dc1.substr(0, 7) + dc;
// Code to make sure videos work on strongbox.
sbsession = getCookie("sbsession")
sdef = 0;
if (isdefined("Silverlight"))
{
if (Silverlight.isInstalled("1.0"))
{
sdef = 1;
}
}
if (imgg.indexOf("http") == -1)
{
if (sbsession != "")
{
sbsession = sbsession.split("&");
sbsession = sbsession[0]
if(dc.indexOf(sbsession) == -1)
{
ip_pat = /http:\/\/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/
if (dc.match(ip_pat))
{
// The sbsession isn't appended here since it's an IP address.
}
else if (dc.indexOf("www.") == -1)
{
dc = dc.replace("http://", "http://" + sbsession + ".")
}
else
{
dc = dc.replace("http://www.", "http://" + sbsession + ".")
}
}
}
else if (sdef == 0)
{
if (!document.all && isdefined("username") && isdefined("password"))
{
if (username != "")
{
dc = dc.replace("http://", "http://" + username + ":" + password + "@")
}
}
}
imgg = dc + imgg
}
if (sdef == 1)
{
hdth = hdth - 55;
if (wdth > 980)
{
hdth = hdth * (980) / wdth;
wdth = 980;
}
var p_src = 'wmvplayer.xaml';
var p_cfg = {width:wdth,height:hdth,file:imgg,autostart:'true'};
var ply = new jeroenwijering.Player(dv,p_src,p_cfg);
}
else
{
if (wdth > 980)
{
hdth = hdth * (980) / wdth;
wdth = 980;
}
if (document.all) // IE
{
inht += ""
}
else
{
// Code for anything but IE.
inht += ""
}
dv.innerHTML = inht
}
}
prevcss = (poss == 0) ? "nav_hid" : "nav_vis"
nextcss = (poss == picarr.length - 1) ? "nav_hid" : "nav_vis"
if (document.getElementById("gal_prevpage") != undefined)
{
document.getElementById("gal_prevpage").className = prevcss
}
if (document.getElementById("gal_nextpage") != undefined)
{
document.getElementById("gal_nextpage").className = nextcss
}
if (document.getElementById("gal_prevpage_bot") != undefined)
{
document.getElementById("gal_prevpage_bot").className = prevcss
}
if (document.getElementById("gal_nextpage_bot") != undefined)
{
document.getElementById("gal_nextpage_bot").className = nextcss
}
spu = picarr[poss]
if (document.getElementById("sharevideourl") != undefined)
{
document.getElementById("sharevideourl").href = "share.php?id=" + spu[0] + "&type=" + spu[4] + "&mt=" + spu[5]
}
TrackContent(spu)
return false
}
function getCookie(c_name)
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=");
if (c_start!=-1)
{
c_start=c_start + c_name.length+1;
c_end=document.cookie.indexOf(";",c_start);
if (c_end==-1) c_end=document.cookie.length;
return unescape(document.cookie.substring(c_start,c_end));
}
}
return "";
}
function NextImage()
{
nid = 0
for(i = 0; i < picarr.length; i++)
{
if (picarr[i][0] == id)
{
nid = i
}
}
if (picarr[nid+1] != undefined)
{
if (picarr[nid+1][1] == "#trial#")
{
document.location = nourl
return false
}
id = picarr[nid+1][0]
imgg = picarr[nid+1][1]
noman = document.getElementById("nomansland")
if (noman != null)
{
document_location_anchor("id=" + id);
window.location.reload();
}
else
{
document_location_anchor("id=" + id)
return RenderImg(picarr, id, "mediabox")
}
}
else if( parseInt(picarr[nid][6]) )
{
document.location = "gallery.php?id=" + picarr[nid][6] + "&type=" + picarr[nid][4];
}
return false
}
function PrevImage()
{
nid = 0
for(i = 0; i < picarr.length; i++)
{
if (picarr[i][0] == id)
{
nid = i
}
}
if (picarr[nid-1] != undefined)
{
if (picarr[nid-1][1] == "#trial#")
{
document.location = nourl
return false
}
id = picarr[nid-1][0]
imgg = picarr[nid-1][1]
noman = document.getElementById("nomansland")
if (noman != null)
{
document_location_anchor("id=" + id)
window.location.reload();
return false
}
else
{
document_location_anchor("id=" + id)
return RenderImg(picarr, id, "mediabox")
}
}
return false
}
// What happens when a flash movie goes to the next clip.
function playState(obj)
{
ind = obj.index
spu = picarr[ind]
dl = document.location
document_location_anchor(spu[0])
document.title = titletxt
id = spu[0]
if (document.getElementById("sharevideourl") != undefined)
{
document.getElementById("sharevideourl").href = "share.php?id=" + spu[0] + "&type=" + spu[4] + "&mt=" + spu[5]
}
TrackContent(spu)
}
function TrackContent(suu)
{
url = "stattrack.php?pagename=image&id=" + suu[0] + "&cg=" + suu[6] + "&type=" + suu[4] + "&mt=" + suu[5];
url = url + "&rnd=" + Math.floor(Math.random()*1000000)
if (window.XMLHttpRequest)
{
// If IE7, Mozilla, Safari, etc: Use native object
var http = new XMLHttpRequest()
}
else
{
if (window.ActiveXObject)
{
// ...otherwise, use the ActiveX control for IE5.x and IE6
var http = new ActiveXObject("Microsoft.XMLHTTP");
}
}
http.open("GET", url, false);
http.send(null);
}
// CALENDAR POPUP CODE
var ie = document.all
function positionoffset(wg, ot)
{
var toff = (ot=="left") ? wg.offsetLeft : wg.offsetTop;
var parentEl = wg.offsetParent;
while (parentEl != null)
{
toff = (ot=="left") ? toff + parentEl.offsetLeft : toff + parentEl.offsetTop;
parentEl = parentEl.offsetParent;
}
return toff;
}
function showhideobject(obj, e)
{
dropmenuobj.style.left = dropmenuobj.style.top="-500px"
if (e.type=="mouseover")
{
obj.visibility="visible"
}
}
function ietest()
{
if (document.compatMode && document.compatMode!="BackCompat")
{
return document.documentElement
}
else
{
return document.body
}
}
function clearedge(obj, wedge)
{
if (wedge=="rightedge")
{
eoffx=0
var winedge = ie && !window.opera ? ietest().scrollLeft + ietest().clientWidth-15 : window.pageXOffset+window.innerWidth - 15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (winedge-dropmenuobj.x < dropmenuobj.contentmeasure)
eoffx=dropmenuobj.contentmeasure-obj.offsetWidth
return eoffx
}
else
{
eoffy=0
var topedge = ie && !window.opera? ietest().scrollTop : window.pageYOffset
var winedge=ie && !window.opera? ietest().scrollTop+ ietest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (winedge-dropmenuobj.y < dropmenuobj.contentmeasure) //move up?
eoffy=dropmenuobj.contentmeasure+obj.offsetHeight
return eoffy
}
}
function displaycalendarpopup(obj, e)
{
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
if (typeof dropmenuobj!="undefined")
dropmenuobj.style.visibility="hidden"
clearhidemenu()
dropmenuobj=document.getElementById(obj.getAttribute("popid"))
showhideobject(dropmenuobj.style, e)
dropmenuobj.x = positionoffset(obj, "left")
dropmenuobj.y = positionoffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearedge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearedge(obj, "bottomedge")+obj.offsetHeight+"px"
}
function delayhidemenu()
{
delayhide=setTimeout("dropmenuobj.style.visibility='hidden'; dropmenuobj.style.left=0; ",250)
}
function clearhidemenu()
{
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}
function popidtoelement(linkobj)
{
var relvalue=linkobj.getAttribute("popid")
return (relvalue!=null && relvalue!="" && document.getElementById(relvalue)!=null && document.getElementById(relvalue).className=="calendarpopup")? true : false
}
function initcal()
{
var all_links=document.getElementsByTagName("a")
for (var i=0; i