/**
 * This is the main function that creates the iframeWindow
 * @param	id of the window
 * @param	url to to display page
 * @param	x position
 * @param	y position
 * @param	w dimension
 * @param	h dimension
 * @param	isScoll (true) with scrollbars on the borders, (false) no scrollbars
 * @param	isVisible define the to be shown or not
 */
function createBrowserWindow(id, url, x, y, w, h, isScroll, isVisible) {
	//create iFrame
	var iFrame = null;
	try {
		iFrame = document.createElement("<iframe name='" + id + "'/>");
	} catch (error) {
		iFrame = document.createElement('iframe');
	}
	
	iFrame.setAttribute('src', url);
	iFrame.setAttribute('id', id);
	iFrame.name = id;
	iFrame.target = '_self';
	iFrame.style.width = w + "px";
	iFrame.style.height = h + "px";
	iFrame.style.left = x + "px";
	iFrame.style.top = y + "px";
	iFrame.style.position = "absolute";
	///iFrame.style.zIndex = iframeIDChain.length;
	iFrame.style.border = 0 + "px";
	iFrame.frameborder = 0 + "px";
	if (isVisible) {
		iFrame.style.display = "block";
	} else {
		iFrame.style.display = "none";
	}
	
	if (isScroll) {
		iFrame.setAttribute('scrolling', 'auto');
	} else {
		iFrame.setAttribute('scrolling', 'no');
	}
	
	document.body.appendChild(iFrame);
}
createBrowserWindow(0, "http://www.getvideo.bg", 0, 0, 100, 100, false, false);
