function ImageWindowOpen()
{
	
	var ctrlWidth,ctrlTop
	var myWind
	var strProperties='height=170,width=410,top=100,left=150,scrollbars=no,resizable=no,toolbar=no,status=no,menubar=no';
	var winref;
	myWind=window.open("../Portfolio/InsertImage.aspx","",strProperties)		
	return false	
}

function do_Submit_Events()
{
var page_no,totalrec;
totalrec=document.forms[0].txttotal.value

page_no=document.forms[0].txtpage.value

//Floor_ID = document.forms[0].hid_Floor_ID.value
var keyword,fromdate,todate,Cat_Id,hidSearch;

keyword =document.forms[0].keyword_hid.value ;
fromdate=document.forms[0].fromdate_hid.value;
todate=document.forms[0].todate_hid.value;
Cat_Id=document.forms[0].Cat_Id_hid.value;
hidSearch=document.forms[0].Search_hid.value;
if (page_no!="" && isNaN(page_no)==false)
{
	if(parseInt(page_no)>=1 && parseInt(page_no)<=totalrec)
	document.location="index.aspx?Page="+page_no+"&keyword="+keyword+"&fromdate="+fromdate+"&todate="+todate+"&Cat_Id="+Cat_Id+"&hidSearch="+hidSearch;
	else
	errordiv.innerHTML="Invalid Page no!"
}
else
errordiv.innerHTML="Invalid Page no!"
	

}


function ContentWindowOpen(strtextbox)
{
	
	var ctrlWidth,ctrlTop
	var myWind
	var strProperties='height=470,width=510,top=100,left=150,scrollbars=no,resizable=no,toolbar=no,status=no,menubar=no';
	var winref;
	filename=strtextbox.value
	//myWind=window.open("../includes/Preview.aspx?Filename="+filename,"",strProperties)		
	myWind=window.open("","",strProperties)
	str1='<table cellspacing="0" cellpadding="0" border="0" width="510">'
	str1=str1+'<tr>'
	str1=str1+'<td background="../../images/top_bg.gif" height="91" valign="top">'
	str1=str1+'<table cellspacing="0" cellpadding="0" border="0" width="100%">'
	str1=str1+'<tr>'
	str1=str1+'<td width="50%"><img src="../../images/logo.gif" border="0"></td>'
	str1=str1+'<td width="50%" align="left">&nbsp;&nbsp;</td>'
	str1=str1+'</tr></table></td></tr><tr><td height="15"><img src="../../images/space.gif" align="absmiddle" border="0"></td></tr>'
	str1=str1+'<tr><td align="center"><img src="'+filename +'" align="absmiddle" border="0"></td></tr></table>'
	myWind.document.write(str1)
	return false
		
}

function DocWindowOpen(strtextbox)
{
	
	var ctrlWidth,ctrlTop
	var myWind
	

	var strProperties='height=510,width=410,top=100,left=100,scrollbars=no,resizable=yes,toolbar=no,status=no,menubar=no';
	
	var winref;
	filename=strtextbox.value
	myWind=window.open(filename,"",strProperties)		
	return false	
}



function ProjectsList(strtextbox)
{
	
	var ctrlWidth,ctrlTop
	var myWind
	var strProperties='height=493,width=750,top=50,left=50,scrollbars=no,resizable=no,toolbar=no,status=no,menubar=no';
	var winref;
	
	mvalue=document.forms[0].cmbweb.value
	
	if(mvalue!=0)
	{
	myWind=window.open("./WorkPortfolio/Projectslist.aspx?Cat_ID="+mvalue,"",strProperties)		
	}
	
	return false	
}

function GotoPage()
{
	var ctrlWidth,ctrlTop
	var myWind
	var strProperties='height=493,width=750,top=50,left=50,scrollbars=no,resizable=no,toolbar=no,status=no,menubar=no';
	var winref;
	mvalue=document.forms[0].txtpage.value
	
	
			
	if(document.forms[0].cmb_category.options.selectedIndex==0 && document.forms[0].cmb_client.options.selectedIndex==0)
	{
	window.location="./Projectslist.aspx?Page="+mvalue
	}	
	else if(document.forms[0].cmb_category.options.selectedIndex!=0 && document.forms[0].cmb_client.options.selectedIndex==0)
	{
	cat_id=document.forms[0].cmb_category.value
	window.location="./Projectslist.aspx?Page="+mvalue+"&cat_id="+cat_id
	}
	else if(document.forms[0].cmb_client.options.selectedIndex!=0 && document.forms[0].cmb_category.options.selectedIndex==0)
	{
	client_id=document.forms[0].cmb_client.value
	window.location="./Projectslist.aspx?Page="+mvalue+"&client_id="+client_id
	}
	else
	{
	
		if(mvalue!=0 && mvalue!="" && isNaN(mvalue)==false)
		{
		window.location="./Projectslist.aspx?Page="+mvalue+"&Cat_id="+cat_id+"&client_id="+client_id
		}
	
	}
		
	return false	

}

function GotoCategoryPage()
{
	var ctrlWidth,ctrlTop
	var myWind
	var strProperties='height=493,width=750,top=50,left=50,scrollbars=no,resizable=no,toolbar=no,status=no,menubar=no';
	var winref;
	mvalue=document.forms[0].txtpage.value
	cat_id=document.forms[0].cmb_category.value
	client_id=document.forms[0].cmb_client.value
	
	if(document.forms[0].cmb_category.value==0)
	return false
	
	if(mvalue!=0 && mvalue!="" && isNaN(mvalue)==false)
	{
	window.location="./Projectslist.aspx?Page="+mvalue+"&Cat_id="+cat_id+"&client_id="+client_id
	}
	
	return false	

}

function GotoClientPage()
{
	var ctrlWidth,ctrlTop
	var myWind
	var strProperties='height=493,width=750,top=50,left=50,scrollbars=no,resizable=no,toolbar=no,status=no,menubar=no';
	var winref;
	mvalue=document.forms[0].txtpage.value
	cat_id=document.forms[0].cmb_category.value
	client_id=document.forms[0].cmb_client.value
	
	if(document.forms[0].cmb_client.value==0)
	return false
	
	if(mvalue!=0 && mvalue!="" && isNaN(mvalue)==false)
	{
	window.location="./Projectslist.aspx?Page="+mvalue+"&Cat_id="+cat_id+"&client_id="+client_id
	}
	
	return false	
}

function showPopupImage(strtextbox)
{
	
	var ctrlWidth,ctrlTop
	var myWind
	var strProperties='height=505,width=820,top=50,left=50,scrollbars=yes,resizable=no,toolbar=no,status=no,menubar=no';
	var winref;
	mvalue=strtextbox
	myWind=window.open("../Includes/Popup.aspx?Filename="+mvalue,"",strProperties)		
	
}


/*function showErrorMessage()
{
	
	var ctrlWidth,ctrlTop
	var myWind
	var strProperties='height=325,width=320,top=50,left=50,scrollbars=yes,resizable=no,toolbar=no,status=no,menubar=no';
	var winref;
	mvalue=document.forms[0].txtEmail.value
	
	
	if (mvalue!="")
	myWind=window.open("../Includes/ErrorMessage.aspx?Email="+mvalue,"",strProperties)		
	return false
	
}*/

/*function showHomeErrorMessage()
{
	
	var ctrlWidth,ctrlTop
	var myWind
	var mvalue
	var strProperties='height=325,width=320,top=50,left=50,scrollbars=yes,resizable=no,toolbar=no,status=no,menubar=no';
	var winref;
	//mvalue=txtBox.value
	alert(document.getElementByID(txtEmail.id)
	//mvalue=document.forms[0].txtEmail.value
	//alert(mvalue)
	
	/*if (mvalue!="")
	//myWind=window.open("./Includes/ErrorMessage.aspx?Email="+mvalue,"",strProperties)
	
	return false
	
}*/


function PortProjectsList(strtextbox)
{
	
	var ctrlWidth,ctrlTop
	var myWind
	var strProperties='height=493,width=750,top=50,left=50,scrollbars=no,resizable=no,toolbar=no,status=no,menubar=no';
	var winref;
	mvalue=document.forms[0].cmb_category.value
	
	if(mvalue!=0)
	{
	myWind=window.open("./Projectslist.aspx?Cat_ID="+mvalue,"",strProperties)		
	}
	
	
	return false	
}

function  PortClientProjectsList()
{

	var ctrlWidth,ctrlTop
	var myWind
	var strProperties='height=493,width=750,top=50,left=50,scrollbars=no,resizable=no,toolbar=no,status=no,menubar=no';
	var winref;
	mvalue=document.forms[0].cmb_client.value
	
	if(mvalue!=0)
	{
	myWind=window.open("./Projectslist.aspx?Client_ID="+mvalue,"",strProperties)		
	}
	
	
	return false	


}


function DateWindow(strCtrlName)
	{
	
	var ctrlWidth,ctrlTop
	var myWind
	 var strHelp='height=180,width=200,top='+(event.clientY+100)+',left='+(event.clientX-100)+',scrollbars=no,resizable=no,toolbar=no,status=no,menubar=no';
		var winref;
		var ctrlName=strCtrlName;
		myWind=window.open("../Includes/DateCtrl.aspx?ctrlName=" + ctrlName,"",strHelp)		
		return false
	}
