var BPVBS=new ddtabcontent("BPVBStabs")
BPVBS.setpersist(true)
BPVBS.setselectedClassTarget("linkparent") //"link" or "linkparent"
BPVBS.init()

var IS=new ddtabcontent("IStabs")
IS.setpersist(true)
IS.setselectedClassTarget("linkparent") //"link" or "linkparent"
IS.init()

var FF=new ddtabcontent("FFtabs")
FF.setpersist(true)
FF.setselectedClassTarget("linkparent") //"link" or "linkparent"
FF.init()

commentBox = new DHTML_modalMessage();	// We only create one object of this class
commentBox.setShadowOffset(5);	// Large shadow
	
function showCommentFlyBox(url)
{	
	commentBox.setSource(url);
	commentBox.setCssClassMessageBox(false);
	commentBox.setSize(600,370);
	commentBox.setShadowDivVisible(true);	// Enable shadow for these boxes
	commentBox.display();
}

	window.addEvent('domready', function() {
		//If Comment Form Submitted
		$('commentUser').addEvent('submit', function(e) {
			
				new Event(e).stop();
				
				if($('userCommentError')!=undefined)
				{
					//Dont Allow to submit the form
					return false;
				}
				
				if(!$('userComment').disabled) {	
						
					this.send({onComplete: function() {
														var element = new Element('div',{'class':'rowA clsCommonListingVideos clearfix'}).setHTML(this.response.text).inject('commentsList','top');
														var slider = new Fx.Slide(element).hide().slideIn();
													}
							   });
					}		   
			});
			
			
		//Toggle Option For Comment Form		
		var myVerticalSlide = new Fx.Slide('clsSubmitComment');

		$('leaveComment').addEvent('click', function(e){
		new Event(e).stop();
		myVerticalSlide.toggle();
		
	   });
	   
	   	//SlideOut Comment Form
		$('cancelComment').addEvent('click', function(e){
		new Event(e).stop();
		myVerticalSlide.slideOut();
		
	  });
			
	});
