var popUp;

function OpenBio(id)
{
	popUp = window.open('pbio.php?id=' + id, 
		'PortfolioBio', 
		'width=620,height=370,left=100,top=100,scrollbars=yes');
}
function OpenRequestPortfolio()
{
	popUp = window.open('chooseportfolio.php', 
		'RequestPortfolio', 
		'width=600,height=600,left=50,top=50,scrollbars=yes');
}
function OpenArtistSubmissions()
{
	popUp = window.open('artistsubmissions.php', 
		'RequestPortfolio', 
		'width=770,height=420,left=50,top=50,scrollbars=no');
}
function OpenImage(pid,iid,w,h,type)
{
	if(w<700){
		w = 700;
	}else{
		w = w+100;
	}
	h = h+100;
	popUp = window.open('pimg.php?pid=' + pid + '&iid=' + iid + '&type=' + type, 
		'Img',
		'width=' + w + ',height=' + h + ',left=200,top=250,scrollbars=no');
}

function OpenClientImages(pid,cid)
{
	popUp = window.open('imglist.php?pid=' + pid + '&cid=' + cid, 
		'Img',
		'width=600,height=400,left=100,top=150,scrollbars=yes');
}

function OpenFreeFormProps(id,type)
{
	popUp = window.open('img_freeformprops.php?id=' + id + '&type=' + type, 
		'FreeFormProps', 
		'width=280,height=330,left=200,top=250,scrollbars=no');
}

function OpenKeywords(id)
{
	popUp = window.open('img_keywords.php?id=' + id, 
		'Keywords', 
		'width=280,height=330,left=200,top=250,scrollbars=no');
}

function OpenStockArtSearch(criteria,type)
{
	popUp = window.open('stockart.php?s=' + criteria + '&t=' + type, 
		'StockArtSearch', 
		'width=720,height=450,left=50,top=50,scrollbars=yes');
}

function OpenForSaleSearch(criteria,type)
{
	popUp = window.open('forsale.php?s=' + criteria + '&t=' + type, 
		'ForSaleSearch', 
		'width=720,height=450,left=50,top=50,scrollbars=yes');
}

function ClosePopUp()
{
	window.opener.document.forms[0].submit();
	popUp.close();
}		

