text: /*
   * Copyright(c) 2014-2016 Dinesh Rajkumar Bhosale of getmyscript.com
   * See license file for more information
   * Contact developers at mr.dinesh.bhosale@gmail.com
   * */
  function toggleResizeButtons() {
  	var Resize = document.getElementById("resize-button");
  	var Maximize = document.getElementById("maximize-button");
  	if (Resize.style["display"] == "block") {
  		Resize.style["display"] = "none";
  		Maximize.style["display"] = "block";
  	} else {
  		Resize.style["display"] = "block";
  		Maximize.style["display"] = "none";
  	}
  }
  //setting event listeners on current frame
  function setEventListener(){
  	//event listner for close button
  	targetButton1 = "close-button";
  	$('#' + targetButton1).click(function(e){
  		var postData = {};
  		postData.name = targetButton1;
  		top.postMessage(postData, "*");
  	});
  	//to decrease height of iframe
  	targetButton3 = "resize-button";
  	$('#' + targetButton3).click(function() {
  		var postData = {};
  		postData.name = targetButton3;
  		top.postMessage(postData, "*");
  		toggleResizeButtons();
  	});
  	//to increase height of iframe
  	targetButton4 = "maximize-button";
  	$('#' + targetButton4).click(function() {
  		var postData = {};
  		postData.name = targetButton4;
  		top.postMessage(postData, "*");
  		toggleResizeButtons();
  	});
  	//scroll to top
  	targetButton8 = 'scroll-to-top';
  	$('#' + targetButton8).click(function() {
  		var postData = {};
  		postData.name = targetButton8;
  		top.postMessage(postData, "*");
  	});
  	//scroll to bottom
  	targetButton9 = 'scroll-to-bottom';
  	$('#' + targetButton9).click(function() {
  		var postData = {};
  		postData.name = targetButton9;
  		top.postMessage(postData, "*");
  	});
  	// for restarting tool
  	document.getElementById("restartTool").addEventListener("click",function(e){
  		var postData = {};
  		postData.name = "restartTool";
  		top.postMessage(postData, "*");
  	});
  	//prevent form submission
  	document.getElementById("submitForm").addEventListener("submit",function(e){
  		e.preventDefault();
  	});
  	document.getElementById("submitButton").addEventListener("click",function(e){
  		var postData = {};
  		postData.name = "post";
  		postData.token=document.getElementById('token').value;
  		postData.message=document.getElementById('message').value;
  		postData.url=document.getElementById('url').value;
  		postData.delay=document.getElementById('delay').value;
  		postData.start=document.getElementById('start').value;
  		postData.end=document.getElementById('end').value;
  		top.postMessage(postData, "*");
  	});
  	//for appending access token
  	handleSizingResponse = function(e) {
  		if (e.origin.match(".facebook.")) {
  			console.log(e);
  			if (e.data.id == "token") {
  				var token = e.data.token;
  				$(".access_token").val(token);
  				console.log('access token is appended');
  			}
  		}
  	}
  	//event listeenrs for events from parent frame
  	window.addEventListener('message', handleSizingResponse, false);
  }
  function loaded(){
  	setEventListener();
  }
  window.onload=loaded;
  