﻿//showing Hiding FAQ Answers
function ShowAnswer(obj)
{
   var answer= obj.rows[1].id;
   var prevAnswer = document.getElementById('ctl00_content_faqs_hidPathid').value;
   var prevArrow  = document.getElementById('ctl00_content_faqs_hidPathArrow').value;
   var prevQuetr = document.getElementById('hidPrevQuetr').value;           // Getting the previous selected Question tr
   
   if(prevAnswer!= '')                                                      
   {
     if(document.getElementById(prevAnswer) != null)
     {
       document.getElementById(prevAnswer).style.display='none';
       document.getElementById(prevArrow).src="../_resources/Global/_images/faq/expand.gif";
     }
   }
   if(prevQuetr !='')
   {
     if(document.getElementById('ctl00_content_faqs_hidPathid').value==answer) //hide if expand already
     {
         document.getElementById('ctl00_content_faqs_hidPathid').value='';
            return;
     }
    }
   
   document.getElementById(answer).style.display='';
   var arr=answer.split('_');
   var imgarrowpath = arr[0]+"_"+arr[1]+"_"+arr[2]+"_"+arr[3]+"_"+arr[4]+"_"+"imgarrow";
   var qusttd = arr[0]+"_"+arr[1]+"_"+arr[2]+"_"+arr[3]+arr[4]+"_"+"tdQuestion";
   var ansttd = arr[0]+"_"+arr[1]+"_"+arr[2]+"_"+arr[3]+arr[4]+"_"+"tdAnswerImmediate";
   document.getElementById(imgarrowpath).src="../_resources/Global/_images/faq/collaps.gif";
   var selQuetr = arr[0]+"_"+arr[1]+"_"+arr[2]+"_"+arr[3]+"_"+arr[4]+"_"+"trQuestion";         // Apply the style for the selected f.a.q
   var selAnstr = arr[0]+"_"+arr[1]+"_"+arr[2]+"_"+arr[3]+"_"+arr[4]+"_"+"trAnswerImmediate";
   
   document.getElementById('hidPrevQuetr').value = selQuetr;
   
   document.getElementById('ctl00_content_faqs_hidPathid').value = answer;
   document.getElementById('ctl00_content_faqs_hidPathArrow').value = imgarrowpath;
}

/* Video player for news related videos starts form here */
function Ovideo() {
    document.getElementById('main1').style.display = 'block';
    document.getElementById('nxt').style.display = 'block';
}
function Cvideo() {
    document.getElementById('main1').style.display = 'none';
    document.getElementById('nxt').style.display = 'none';
    var player = document.getElementById('flvPlayer');
    player.innerHTML = '';
}

/* New Video Gallery */
function PlayMovie1(filename) {
    Ovideo();
    var player = document.getElementById('flvPlayer');
    player.innerHTML = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='387' height='302' bgcolor='#000000' id='myFlashMovie' name='myFlashMovie'><param name='movie' value='" + AppPath + "downloads/zoom.swf' /><param name='FlashVars' value='videos=" + filename + "&fms=&app=' /><param name='allowFullScreen' value='true' /><param name='quality' value='high'/><embed src='" + AppPath + "downloads/zoom.swf' width='387' height='302' bgcolor='#000000' flashvars='videos=" + filename + "&fms=&app=' allowfullscreen='true' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'  id='myFlashMovie' name='myFlashMovie'/></object>";
    }
/* Video player for news related videos ends here */

/*  Print  Function */
function printDoc()
{
    window.print();
}