
/*
onerror=handleErr
var txt=""

function handleErr(msg,url,l)
{
txt="There was an error on this page.\n\n"
txt+="Error: " + msg + "\n"
txt+="URL: " + url + "\n"
txt+="Line: " + l + "\n\n"
txt+="Click OK to continue.\n\n"
alert(txt)
return true
}
*/

function ShowHideById(elementID) {
  if (document.getElementById(elementID).style.display=='none')
  {document.getElementById(elementID).style.display='block'}
  else
  {document.getElementById(elementID).style.display='none'}
}


function expandById(elementID){
document.getElementById(elementID).style.display='none'
}

function expandById(elementID){
document.getElementById(elementID).style.display='block'
}


function moveover_signup()
{
document.getElementById('imgSignUp').src="/images/sign_up_button2.gif"
}
function moveback_signup()
{
document.getElementById('imgSignUp').src="/images/sign_up_button.gif"
}

function moveover_signup2()
{
document.getElementById('imgSignUp').src="/images/sign_up_button.gif"
}
function moveback_signup2()
{
document.getElementById('imgSignUp').src="/images/sign_up_button2.gif"
}

function moveover_signup3()
{
document.getElementById('imgSignUp3').src="/images/sign_up_button.gif"
}
function moveback_signup3()
{
document.getElementById('imgSignUp3').src="/images/sign_up_button2.gif"
}

function moveover_post_project()
{
document.getElementById('imgProject').src="/images/post_project_button2.gif"
}
function moveback_post_project()
{
document.getElementById('imgProject').src="/images/post_project_button.gif"
}

var newwindow;
function OpenInNewWindow(img,title,lheight,lwidth)
{
	newwindow=window.open("",'name','left=40,top=60,height=1,width=1,scrollbars=1');
	if (window.focus) {newwindow.focus()}

	newwindow.document.write("<HTML>")
	newwindow.document.write("<TITLE>"+title+"</TITLE>")
	newwindow.document.write("<BODY>")
	newwindow.document.write("<p align='center'><img src='"+img+"'></p>")
	newwindow.document.write("</BODY>")
	newwindow.document.write("</HTML>")
	newwindow.resizeBy(lwidth-60,lheight-76)

}

var newwindow2;
function OpenInNewWindow2(text,title)
{
	newwindow2=window.open("",'name','left=40,top=60,height=200,width=300,scrollbars=1');
	if (window.focus) {newwindow2.focus()}

	newwindow2.document.write("<HTML>")
	newwindow2.document.write("<TITLE>"+title+"</TITLE>")
	newwindow2.document.write("<BODY>")
	newwindow2.document.write("<h3>"+title+"</h3>")
	newwindow2.document.write("<p>"+text+"</p>")
	newwindow2.document.write("</BODY>")
	newwindow2.document.write("</HTML>")
}

var urlwindow;
function OpenUrlInNewWindow(url,lheight,lwidth)
{
	urlwindow=window.open(url,'name','height=1,width=1,scrollbars=1');
	urlwindow.resizeTo(lwidth,lheight);
	if (window.focus) {urlwindow.focus()}
}


var OrgColor

function sb_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


function ChangeCellOver(cell){
  if(document.getElementById||(document.all && !(document.getElementById))){
//  cell.style.backgroundColor="#FFFFFF";
  }
}

function ChangeCellOut(cell){
  if(document.getElementById||(document.all && !(document.getElementById))){
//  cell.style.backgroundColor="#FFFFFF";
  }
}

function help_popup(form,context)
{
var file="help_popup.php?form=" + form+"&context="+context;
window.open(file,"Help","top=5,left=30,toolbars=no,maximize=yes,resize=yes,width=550,height=200,location=no,directories=no,scrollbars=yes");
}


/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="view_all_designers.php?sb_type=1">Featured Portfolios</a>'
menu1[1]='<a href="browse_designers.php">Browse Portfolios</a>'
menu1[2]='<a href="search_designers.php">Search Portfolios</a>'

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="manage_projects.php">Manage Projects</a>'
menu2[1]='<a href="review-messages.php">My Messages</a>'
menu2[2]='<a href="view_profile.php">View Profile</a>'
menu2[3]='<a href="editprofile.php">Edit Profile</a>'
menu2[4]='<a href="changepassword.php">Change Password</a>'
menu2[5]='<a href="logout.php">Log Out</a>'

var menu11=new Array()
menu11[0]='<a href="browse_packages.php">Browse Packages</a>'
menu11[1]='<a href="search_packages.php">Search Packages</a>'

//Start Designer Menus
var menu3=new Array()
menu3[0]='<a href="view_bids.php">My Bids</a>'
menu3[1]='<a href="review-messages.php">My Messages</a>'
menu3[2]='<a href="review-invites.php">My Bid Invitations</a>'
menu3[3]='<a href="https://www.postbidwin.com/upgrade_account.php">Upgrade Account</a>'
menu3[4]='<a href="memberships.php">Account Comparison</a>'
menu3[5]='<a href="changepassword.php">Change Password</a>'
menu3[6]='<a href="logout.php">Log Out</a>'

var menu4=new Array()
menu4[0]='<a href="view_portfolio.php">View Portfolio</a>'
menu4[1]='<a href="edit_portfolio.php">Edit Portfolio</a>'
menu4[2]='<a href="edit_gallery.php">Edit Gallery</a>'
menu4[3]='<a href="approve-networking.php">Comment & Network</a>'
menu4[4]='<a href="javascript:OpenUrlInNewWindow(\'/share-portfolio.php\', 446,480)">Share My Portfolio</a>'
menu4[5]='<a href="edit_watermark.php">Watermark Options</a>'
//menu4[2]='<a href="editprofile.php">Edit Profile</a>'

var menu5=new Array()
menu5[0]='<a href="help-buy-now.php">What\'s a Buy Now Package?</a>'
menu5[1]='<a href="package_edit.php">Add Package</a>'
menu5[2]='<a href="packages_view.php">Edit Packages</a>'

var menu6=new Array()
menu6[0]='<a href="view_all.php">All Projects</a>'
menu6[1]='<a href="view_all.php?sb_type=1">Featured Projects</a>'
menu6[2]='<a href="browse_projects.php">Browse Projects</a>'
menu6[3]='<a href="search_form.php">Search Projects</a>'

//START MENUS NO ONE LOGGED IN
var menu7=new Array()
menu7[0]='<a href="portfolios-advertisers.php">What We Offer</a>'
menu7[1]='<a href="choose-descriptions.php">Account Descriptions</a>'
menu7[2]='<a href="memberships.php">Account Comparison</a>'
menu7[3]='<a href="/design-services-for-designers.php">What Sets Us Apart</a>'

var menu8=new Array()
menu8[0]='<a href="post_project_signup.php">Post A Project</a>'
menu8[1]='<a href="browse_designers.php">Browse Portfolios</a>'
menu8[2]='<a href="search_designers.php">Search Portfolios</a>'
menu8[3]='<a href="view_all_designers.php">Top Portfolios</a>'
menu8[4]='<a href="buyers.php">Learn More</a>'
menu8[5]='<a href="signup_buyer.php">Sign Up</a>'

var menu9=new Array()
menu9[0]='<a href="signup_designer.php">Create a Portfolio</a>'
menu9[1]='<a href="view_all.php">Browse Projects</a>'
menu9[2]='<a href="designers.php">Learn More</a>'
menu9[3]='<a href="signup_designer.php">Sign Up</a>'

var menuwidth='155px' //default menu width
var menubgcolor='#D7E0B2'  //menu bgcolor #DDDDDD
var disappeardelay=200  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="no" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu


