function init(){ if (arguments.callee.done) return; // flag this function so we don't do the same thing twice arguments.callee.done = true; // kill the timer if (_timer) { clearInterval(_timer); _timer = null; } GetVideoDesc(5); } function GetVideoDesc(num) { Drupal.service('views.getView', {api_key: "4d16a4515ef7e7698adea9ed91d2f62a", sessid: "sdfjahsldjfhlaksuertybsi", view_name: "video", args:[num], fields: ["nid","title","body","files", "filepath","field_description","field_channel","field_name","field_county_of_birth","field_camps_liberated_or_visite","field_camps","field_city_of_birth","field_country_of_military_servi","field_dob","field_forced_death_marches","field_gender","field_ghettos","field_length_of_interview","field_other_experiences","field_went_into_hiding"] }, function(error, data) { if(error == false) { for(itm in data) { var vidname = ""; // load the video & thumbnail into the player for(file in data[itm].files) { //Find filename of video vidname = "/vhi/cms/" + data[itm].files[file].filepath; //alert(vidname); //alert(vidname); } // load the channel description into the bottom var chanid = ""; for(file in data[itm].field_channel) { //Find filename of video chanid = data[itm].field_channel[file].nid; //displayChannelInfo(chanid); //alert(chanid); } //load the video description into the right var $videodesc = ""; $videodesc = "
" + data[itm].field_name[0].value + "
" + data[itm].field_description[0].value + "

" + addField("Gender", data[itm].field_gender[0].value) + addField("DOB", data[itm].field_dob[0].value) + addField("City of birth", data[itm].field_city_of_birth[0].value) + addField("Country of birth", data[itm].field_county_of_birth[0].value) + addField("Ghettos",data[itm].field_ghettos[0].value) + addField("Camps",data[itm].field_camps[0].value) + addField("Went into hiding",data[itm].field_went_into_hiding[0].value) + addField("Forced (death) marches",data[itm].field_forced_death_marches[0].value) + addField("Country of military service",data[itm].field_country_of_military_servi[0].value) + addField("Camp(s) liberated or visited post-liberation",data[itm].field_camps_liberated_or_visite[0].value) + addField("Other experiences",data[itm].field_other_experiences[0].value) + addField("Length of interview",data[itm].field_length_of_interview[0].value) + "
" //var div = document.getElementById("videodesc"); //div.innerHTML = $videodesc; var formVideoDesc = document.form_videoDescData; formVideoDesc._videoDesc.value = $videodesc; formVideoDesc.submit(); } } else { //do nothing } } ); } function displayChannelInfo(chan) { Drupal.service('views.getView', {api_key: "4d16a4515ef7e7698adea9ed91d2f62a", sessid: "sdfjahsldjfhlaksuertybsi", view_name: "channels", args:[chan], fields: ["nid","title","body_value"] }, function(error, data) { if(error == false) { var $channeldesc = ""; $channeldesc = "
" + data[itm].title + "
" + data[itm].body_value + "
"; //alert(data[itm].body_value); //var div = document.getElementById("channeldesc"); //div.innerHTML = $channeldesc; if(data[itm]){ var formChannelDesc = document.form_channelDescData; formChannelDesc._channelDesc.value = $channeldesc; formChannelDesc.submit(); } } } ); } function playVideo(num) { Drupal.service('views.getView', {api_key: "4d16a4515ef7e7698adea9ed91d2f62a", sessid: "sdfjahsldjfhlaksuertybsi", view_name: "video", args:[num], fields: ["nid","title","body","files", "filepath","field_description","field_channel","field_name","field_county_of_birth","field_camps_liberated_or_visite","field_camps","field_city_of_birth","field_country_of_military_servi","field_dob","field_forced_death_marches","field_gender","field_ghettos","field_length_of_interview","field_other_experiences","field_went_into_hiding"] }, function(error, data) { if(error == false) { for(itm in data) { var vidname = ""; // load the video & thumbnail into the player for(file in data[itm].files) { //Find filename of video vidname = "/vhi/cms/" + data[itm].files[file].filepath; loadFile({file: vidname,image:''}); //alert(vidname); openPlay(0); //alert(vidname); } // load the channel description into the bottom var chanid = ""; for(file in data[itm].field_channel) { //Find filename of video chanid = data[itm].field_channel[file].nid; displayChannelInfo(chanid); //alert(chanid); } //load the video description into the right var $videodesc = ""; $videodesc = "
" + data[itm].field_name[0].value + "
" + data[itm].field_description[0].value + "

" + addField("Gender", data[itm].field_gender[0].value) + addField("DOB", data[itm].field_dob[0].value) + addField("City of birth", data[itm].field_city_of_birth[0].value) + addField("Country of birth", data[itm].field_county_of_birth[0].value) + addField("Ghettos",data[itm].field_ghettos[0].value) + addField("Camps",data[itm].field_camps[0].value) + addField("Went into hiding",data[itm].field_went_into_hiding[0].value) + addField("Forced (death) marches",data[itm].field_forced_death_marches[0].value) + addField("Country of military service",data[itm].field_country_of_military_servi[0].value) + addField("Camp(s) liberated or visited post-liberation",data[itm].field_camps_liberated_or_visite[0].value) + addField("Other experiences",data[itm].field_other_experiences[0].value) + addField("Length of interview",data[itm].field_length_of_interview[0].value) + "
" //var div = document.getElementById("videodesc"); //div.innerHTML = $videodesc; var formVideoDesc = document.form_videoDescData; formVideoDesc._videoDesc.value = $videodesc; formVideoDesc.submit(); } } else { //do nothing } } ); } var currentlyOnThumb = null; var currentlyOnThumbOff = null; function handleThumbs(thumbon,thumboff,elementID,isOver){ if(elementID!=currentlyOnThumb){ var target = document.getElementById(elementID); if(isOver == true){ target.src = thumbon; }else if(isOver == false){ target.src = thumboff; } } } function setThumbOn(thumbon,thumboff,elementID){ if(currentlyOnThumb!=null){ document.getElementById(currentlyOnThumb).src = currentlyOnThumbOff; } currentlyOnThumb = elementID; currentlyOnThumbOff = thumboff; document.getElementById(elementID).src = thumbon; } function addField(field, value) { if (value==undefined || value.length<1) return ""; return field + ": " + value + "
"; } var calledChannel = 1; function displayChannel(chanid) { // Display thumbnails and add functionality of channel pre-war Drupal.service('views.getView', {api_key: "4d16a4515ef7e7698adea9ed91d2f62a", sessid: "sdfjahsldjfhlaksuertybsi", view_name: "videos", args:[chanid], fields: ["nid","title","body","files", "field_inactive_thumbnail", "field_active_thumbnail", "filepath"] }, function(error, data) { if(error == false) { var $myoutput = ""; var totalvid = 0; for(itm in data) { var vidname = ""; var thumboff = ""; var thumbon = ""; totalvid = totalvid + 1; for(file in data[itm].files) { //Find filename of video vidname = "../cms/" + data[itm].files[file].filename; } for(file in data[itm].field_inactive_thumbnail) { //Find filename of thumbnail thumboff = "../cms/" + data[itm].field_inactive_thumbnail[file].filepath; } for(file in data[itm].field_active_thumbnail) { //Find filename of thumbnail thumbon = "../cms/" + data[itm].field_active_thumbnail[file].filepath; } $myoutput += ""; } $myoutput += "
\""
"; var div = document.getElementById(chanid); div.innerHTML = $myoutput; //alert(totalvid); //Generate right arrow for items over 4 if (totalvid > 2) { var $myoutputarrow = ""; $myoutputarrow += ""; var div = document.getElementById(chanid + "arrow"); div.innerHTML = $myoutputarrow; //alert($myoutputarrow); } else { //Do nothing } } else { //do nothing } } ) };