
window.onload				= init;

function init()
{
	if(window.initKSForm) initKSForm();	
}

function send_sendToAFriend(path,nPopupWinWidth, nPopupWinHeight, bPopupWinScrollbars, bPopupWinToolbar)
{
	nPopupWinTop = screen.height/2 - nPopupWinHeight/2;
	nPopupWinLeft = screen.width/2 - nPopupWinWidth/2;
	
	//nDocID, nFolderID, strDoctype, strPageHeader
	//window.open(strLocation + 'TemplateControls/SendToAFriendTemplatePopup.aspx?docID=' + nDocID + '&folderID=' + nFolderID + '&docType=' + strDoctype + '&pageHeader=' + strPageHeader, 'sendToFrient','top=' + nPopupWinTop + ',left=' + nPopupWinLeft + ',width=' + nPopupWinWidth + ',height=' + nPopupWinHeight + ',scrollbars=' + (bPopupWinScrollbars=='True'?'yes':'no') + ',toolbar=' + (bPopupWinToolbar=='True'?'yes':'no'));
	
	var arrLocation = String(document.links[0]).split('Templates');
	window.open(path, 'sendToFrient','top=' + nPopupWinTop + ',left=' + nPopupWinLeft + ',width=' + nPopupWinWidth + ',height=' + nPopupWinHeight + ',scrollbars=' + bPopupWinScrollbars + ',toolbar=' + bPopupWinToolbar);
}

function play_video(videoSource)
{
	var frameObj = document.getElementById('VideoTemplate1_frameVideo');
	frameObj.src	=	videoSource;
}

function openPopUpWindow(url,width,height,scroll,resizable)
{
	window.open(url,null,'height=' + height + ',width=' + width + ',menubar=no,scrollbars=' + scroll + ',resizable=' + resizable);
}

