// JavaScript Document
function docSubmit(frm)
{
	frm=eval("document."+frm);
	frm.submit();
}


function frmActionDirect(frmname,hdfldname,hdfldvalue,frmaction,isredirect)
{
/*alert(frmname);
alert(hdfldname);
alert(hdfldvalue);
alert(frmaction);
alert(isredirect);
*/	
	obj=eval("document."+frmname+"."+hdfldname);
	frm=eval("document."+frmname);
	obj.value=hdfldvalue;
	if(isredirect == 0){
		frm.action=frmaction;
		frm.submit();
	}
	if(isredirect == 1)
	{
		window.location.href = frmaction+'?'+hdfldname+'='+hdfldvalue;
	}
	
/**/
}


function isValidFile(MyFile,FileFormat)
{
		FileArray = MyFile.split("\\")
		FileName = FileArray[FileArray.length-1]
		ExtArray = FileName.split(".")
		Ext = ExtArray[ExtArray.length-1]
		Ext = Ext.toUpperCase(Ext)
		if(Ext==""+FileFormat+"")
			return true;
		else
			return false;
	
}

function backFunction()
{	
	
	window.history.back(-1);
	
}

function backTo(val)
{	
	if(val=='')
	{
		window.history.back(-1);
	}	
	else
	{
		val;
		window.location.href=val;
	}
}

function addBookmark(title,url) {
if(document.all) {
window.external.AddFavorite( url, title);
} else { 
alert("Press Ctrl + D (Windows) or Cmd + D (Mac) to Add MyPages.com to your bookmarks.")
}
}

function MM_openBrWindow(theURL,winName,features) 
{ 
	window.open(theURL,winName,features);
	if ((document.window != null) && (!hWnd.opener))
		hWnd.opener = document.window;
}
function BigImagePopUp(SitePath, ImageFullPath)
{
	//alert(SitePath);
	//alert(ImageFullPath);
	var ScreenWidth  = screen.width;
	var ScreenHeight = screen.height;
	var PopupWidth   = 400;
	var PopupHeight  = 400;
	var PopupLeft    = (ScreenWidth-PopupWidth)/2;
	var PopupTop     = (ScreenHeight-PopupHeight)/2;
	MM_openBrWindow(SitePath+'bigimage.php?ImageFullPath='+ImageFullPath,'PopupWindow','maximize=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+PopupWidth+',height='+PopupHeight+',left='+PopupLeft+',top='+PopupTop);
}
