﻿function OpenFlyInPopup(behaviorID) {
	var behavior = $find(behaviorID);
	if (behavior) {
		behavior.show();
	}
}

function ResizeFlyInPopup(behaviorID) {
	var behavior = $find(behaviorID);
	if (behavior) {
		
	} 
} 
function CloseFlyInPopup(behaviorID) {
	var behavior = $find(behaviorID);
	if (behavior) {
		behavior.hide();
	}
}

function splitString(stringToSplit, separator) {
	return stringToSplit.split(separator);
}

function setInnerHTMLAndExecScript(element, html) {
	var newElement = element.cloneNode(false);
	newElement.innerHTML = html;
	element.parentNode.replaceChild(newElement, element);
}

function showhide(id) {
	show = true;
	obj = $get(id + 'Content');
	if (obj) {
		if (obj.style.display != 'none') {
			show = false;
		}
		obj.style.display = (!show) ? 'none' : 'block';
	}

	obj = $get(id + '_collapseimg');
	if (obj) {
		obj.src = (!show) ? 'images/ic-maximize.gif' : 'images/ic-minimize.gif';
	}
}

function Redir(url, options) {
	window.open('redir.aspx?url=' + escape(url), '', options);
} 