/*
ypSlideOutMenu.Registry = []
ypSlideOutMenu.aniLen = 250
ypSlideOutMenu.hideDelay = 500
ypSlideOutMenu.minCPUResolution = 10
function ypSlideOutMenu(id, dir, left, top, width, height)
{
this.ie = document.all ? 1 : 0
this.ns4 = document.layers ? 1 : 0
this.dom = document.getElementById ? 1 : 0
if (this.ie || this.ns4 || this.dom) {
this.id = id
this.dir = dir
this.orientation = dir == "left" || dir == "right" ? "h" : "v"
this.dirType = dir == "right" || dir == "down" ? "-" : "+"
this.dim = this.orientation == "h" ? width : height
this.hideTimer = false
this.aniTimer = false
this.open = false
this.over = false
this.startTime = 0
this.gRef = "ypSlideOutMenu_"+id
eval(this.gRef+"=this")
ypSlideOutMenu.Registry[id] = this
var d = document
d.write('<style type="text/css">')
d.write('#' + this.id + 'Container { visibility:hidden; ')
d.write('left:' + left + 'px; ')
d.write('top:' + top + 'px; ')
d.write('overflow:hidden; }')
d.write('#' + this.id + 'Container, #' + this.id + 'Content { position:absolute; ')
d.write('width:' + width + 'px; ')
d.write('height:' + height + 'px; ')
d.write('clip:rect(0 ' + width + ' ' + height + ' 0); ')
d.write('}')
d.write('</style>')
this.load()
}
}
ypSlideOutMenu.prototype.load = function() {
var d = document
var lyrId1 = this.id + "Container"
var lyrId2 = this.id + "Content"
var obj1 = this.dom ? d.getElementById(lyrId1) : this.ie ? d.all[lyrId1] : d.layers[lyrId1]
if (obj1) var obj2 = this.ns4 ? obj1.layers[lyrId2] : this.ie ? d.all[lyrId2] : d.getElementById(lyrId2)
var temp
if (!obj1 || !obj2) window.setTimeout(this.gRef + ".load()", 100)
else {
this.container = obj1
this.menu = obj2
this.style = this.ns4 ? this.menu : this.menu.style
this.homePos = eval("0" + this.dirType + this.dim)
this.outPos = 0
this.accelConst = (this.outPos - this.homePos) / ypSlideOutMenu.aniLen / ypSlideOutMenu.aniLen 
if (this.ns4) this.menu.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT);
this.menu.onmouseover = new Function("ypSlideOutMenu.showMenu('" + this.id + "')")
this.menu.onmouseout = new Function("ypSlideOutMenu.hideMenu('" + this.id + "')")
this.endSlide()
}
}
ypSlideOutMenu.showMenu = function(id)
{
var reg = ypSlideOutMenu.Registry
var obj = ypSlideOutMenu.Registry[id]
if (obj.container) {
obj.over = true
for (menu in reg) if (id != menu) ypSlideOutMenu.hide(menu)
if (obj.hideTimer) { reg[id].hideTimer = window.clearTimeout(reg[id].hideTimer) }
if (!obj.open && !obj.aniTimer) reg[id].startSlide(true)
}
}
ypSlideOutMenu.hideMenu = function(id)
{
var obj = ypSlideOutMenu.Registry[id]
if (obj.container) {
if (obj.hideTimer) window.clearTimeout(obj.hideTimer)
obj.hideTimer = window.setTimeout("ypSlideOutMenu.hide('" + id + "')", ypSlideOutMenu.hideDelay);
}
}
ypSlideOutMenu.hide = function(id)
{
var obj = ypSlideOutMenu.Registry[id]
obj.over = false
if (obj.hideTimer) window.clearTimeout(obj.hideTimer)
obj.hideTimer = 0
if (obj.open && !obj.aniTimer) obj.startSlide(false)
}
ypSlideOutMenu.prototype.startSlide = function(open) {
this[open ? "onactivate" : "ondeactivate"]()
this.open = open
if (open) this.setVisibility(true)
this.startTime = (new Date()).getTime() 
this.aniTimer = window.setInterval(this.gRef + ".slide()", ypSlideOutMenu.minCPUResolution)
}
ypSlideOutMenu.prototype.slide = function() {
var elapsed = (new Date()).getTime() - this.startTime
if (elapsed > ypSlideOutMenu.aniLen) this.endSlide()
else {
var d = Math.round(Math.pow(ypSlideOutMenu.aniLen-elapsed, 2) * this.accelConst)
if (this.open && this.dirType == "-") d = -d
else if (this.open && this.dirType == "+") d = -d
else if (!this.open && this.dirType == "-") d = -this.dim + d
else d = this.dim + d
this.moveTo(d)
}
}
ypSlideOutMenu.prototype.endSlide = function() {
this.aniTimer = window.clearTimeout(this.aniTimer)
this.moveTo(this.open ? this.outPos : this.homePos)
if (!this.open) this.setVisibility(false)
if ((this.open && !this.over) || (!this.open && this.over)) {
this.startSlide(this.over)
}
}
ypSlideOutMenu.prototype.setVisibility = function(bShow) { 
var s = this.ns4 ? this.container : this.container.style
s.visibility = bShow ? "visible" : "hidden"
}
ypSlideOutMenu.prototype.moveTo = function(p) { 
this.style[this.orientation == "h" ? "left" : "top"] = this.ns4 ? p : p + "px"
}
ypSlideOutMenu.prototype.getPos = function(c) {
return parseInt(this.style[c])
}
ypSlideOutMenu.prototype.onactivate = function() { }
ypSlideOutMenu.prototype.ondeactivate = function() { }
*/

// JavaScript Document
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//header start here
function header() {
	document.write('<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">');
	document.write('<tr>');
    document.write('<td colspan="4"><img src="../images/spacer.gif" width="1" height="10"><img src="../images/spacer.gif" width="1" height="16"></td>');
	document.write('</tr>');
	document.write('<tr>');
    document.write('<td width="186"><a href="../home/index.asp" target="_parent"><img src="../images/img_logo.gif" width="166" height="28" hspace="18" border="0" alt="imageRite Home"></a></td>');
    document.write('<td><span class="slogan">image search revolution</span></td>');
    document.write('<td align="right"> <a href="../account/login.asp" class="linkTopBl" target="_parent">login</a> <a href="../account/register.asp" class="linkTopBk" target="_parent">register</a></td>');
    document.write('<td width="14"><img src="../images/spacer.gif" width="14" height="12"></td>');
	document.write('</tr>');
	document.write('<tr>');
    document.write('<td colspan="4"><img src="../images/spacer.gif" width="1" height="4"></td>');
  	document.write('</tr>');
	document.write('</table>');
}

//top menu start here
function topMenu(tar) {
	over = new Array();
	dot = new Array();
	for(i=1; i<=6; i++) {
		if(i == tar) {
			over[i] = 'menuOn';
			dot[i] = '../images/btn_dot_on.gif';
		} else {
			if (i == 2){
				over[i] = 'menu2';
			}else{
				over[i] = 'menu';
			}
			dot[i] = '../images/btn_dot_off.gif';
		}
	}
	
	//over[2] = 'menu2';
	
	document.write('<table width="100%" border="0" cellpadding="0" cellspacing="1">');
  	document.write('<tr>');
	document.write('<td width="8"><img src="../images/spacer.gif" width="8" height="1"></td>');
    document.write('<td align="center" nowrap><a href="../home/index.asp" class="' + over[1] + '" onMouseOver="MM_swapImage(\'dot1\',\'\',\'../images/btn_dot_on.gif\',1)" onMouseOut="MM_swapImgRestore()" target="_top"><img src="' + dot[1] +'" name="dot1" hspace="4" border="0" id="dot1">image<b>Search</b></a></td>');
    document.write('<td align="center" nowrap><a href="../search/frame.html?open" class="' + over[2] + '" onMouseOver="MM_swapImage(\'dot2\',\'\',\'../images/btn_dot_on.gif\',1)" onMouseOut="MM_swapImgRestore()" target="_top"><img src="' + dot[2] +'" name="dot2" hspace="4" border="0" id="dot2">search<b>Result</b></a></td>');
    document.write('<td align="center" nowrap><a href="../account/index.asp" class="' + over[3] + '" onMouseOver="MM_swapImage(\'dot3\',\'\',\'../images/btn_dot_on.gif\',1)" onMouseOut="MM_swapImgRestore()" target="_top"><img src="' + dot[3] +'" name="dot3" hspace="4" border="0" id="dot3">account<b>Info</b></a></td>');
	document.write('<td align="center" nowrap><a href="../mylightbox/view.asp" class="' + over[4] + '" onMouseOver="MM_swapImage(\'dot4\',\'\',\'../images/btn_dot_on.gif\',1)" onMouseOut="MM_swapImgRestore()" target="_top"><img src="' + dot[4] +'" name="dot4" hspace="4" border="0" id="dot4">my<b>Lightbox</b></a></td>');
    document.write('<td align="center" nowrap><a href="../mycart/view.asp" class="' + over[5] + '" onMouseOver="MM_swapImage(\'dot5\',\'\',\'../images/btn_dot_on.gif\',1)" onMouseOut="MM_swapImgRestore()" target="_top"><img src="' + dot[5] +'" name="dot5" hspace="4" border="0" id="dot5">my<b>Cart</b></a></td>');
	document.write('<td align="center" nowrap><a href="http://www.imagerite.com/studio/html/index.html" target="_blank" class="' + over[6] + '" onMouseOver="MM_swapImage(\'dot6\',\'\',\'../images/btn_dot_on.gif\',1)" onMouseOut="MM_swapImgRestore()" target="_top">&nbsp;&nbsp;&nbsp;&nbsp;<img src="' + dot[6] +'" name="dot6" hspace="4" border="0" id="dot6">photo<b>Assignment</b>&nbsp;&nbsp;&nbsp;&nbsp;</a></td>');
    document.write('<td width="70%" background="../images/bg_menu_end.gif"><img src="../images/spacer.gif" width="1" height="22"></td>');
	document.write('<td width="8"><img src="../images/spacer.gif" width="8" height="1"></td>');
  	document.write('</tr>');
	document.write('</table>');

	
	/*document.write('<DIV id=Layer2 style="Z-INDEX: 2; WIDTH: 1px; POSITION: absolute; HEIGHT: 1px; visibility: visible;">');
	document.write('<DIV id=Layer1 style="Z-INDEX: 1;  VISIBILITY: visible;  POSITION: absolute; ">');
	document.write('<DIV id=menu1Container style="Z-INDEX: 100">');
	document.write('<DIV id=menu1Content>');	
    document.write('<table width="188" border="0" cellspacing="0" cellpadding="0">');
    document.write('<tr><td align="center" nowrap><a href="../home/collection.asp" class="' + over[6] + '" onMouseOver="MM_swapImage(\'dot1\',\'\',\'../images/btn_dot_on.gif\',1)" onMouseOut="MM_swapImgRestore()" target="_self">&nbsp;&nbsp;&nbsp;&nbsp;<img src="' + dot[6] +'" name="dot6" hspace="4" border="0" id="dot6">Image Collections&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td></tr></table></div></div>');	  	
	document.write('</DIV></DIV>');	*/

	//new ypSlideOutMenu("menu1", "down", 0, 0, 200, 200)

}






function searchbox() {
	document.write('<form  action="../search/result.asp"  method="post" name="searchForm">');
	document.write('<table width="178" border="0" cellspacing="0" cellpadding="0">');
    document.write('<tr>');
    document.write('<td><img src="../images/img_cr_01.gif" width="4" height="4"></td>');
    document.write('<td background="../images/img_bdr_01.gif"><img src="../images/spacer.gif" width="170" height="1"></td>');
    document.write('<td><img src="../images/img_cr_02.gif" width="4" height="4"></td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td background="../images/img_bdr_03.gif"><img src="../images/spacer.gif" width="1" height="200"></td>');
    document.write('<td align="center" valign="top"><table width="160" border="0" cellspacing="0" cellpadding="0">');
    document.write('<tr>');
    document.write('<td><img src="../images/spacer.gif" width="1" height="4"></td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td><span class="titBk">new</span> <span class="titBl">search</span></td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td>');
    document.write('<table width="160" border="0" cellpadding="0" cellspacing="0">');
    document.write('<tr>');
    document.write('<td><input name="keywords" type="text" class="iptSearch"></td>');
   //document.write('<td align="right"><input name="Submit" type="submit" class="btnSearch" value="search" onClick="getURL(\'../search/frame.html?open\')"></td>');
   document.write('<td align="right"><input name="Submit" type="submit" class="btnSearch" value="search" ></td>');
    document.write('</tr>');
    document.write('</table>');
    //document.write('<input name="textfield" type="text" class="iptSearch"> <input name="Submit" type="submit" class="btnSearch" value="search">');
    document.write('</td></tr>');
    document.write('<tr>');
    document.write('<td><a href="../search/advsearch.asp" class="linkTxtBk">advanced search</a></td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td valign="top"><img src="../images/spacer.gif" width="1" height="10"></td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td><img src="../images/img_hline.gif" width="160" height="11"></td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td><span class="titBl">filter</span> <span class="titBk">options</span></td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td class="txtBk"><input name="royaltyfree" type="checkbox" value="1" checked> royalty free</td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td class="txtBk"><input name="rightmanaged" type="checkbox" value="1" checked> right managed</td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td><img src="../images/spacer.gif" width="1" height="6"></td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td class="txtBk"><input name="photography" type="checkbox" value="1" checked> photography</td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td height="16" class="txtBk"><input name="illustration" type="checkbox" value="1" checked> illustration</td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td><img src="../images/spacer.gif" width="1" height="6"></td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td class="txtBk"><input name="colorful" type="checkbox" value="1" checked> color</td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td class="txtBk"><input name="blackwhite" type="checkbox" value="1" checked> black &amp; white </td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td><img src="../images/spacer.gif" width="1" height="6"></td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td class="txtBk"><input type="checkbox" name="human"  value="1"> only with models </td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td><img src="../images/spacer.gif" width="1" height="6"></td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td class="txtBk"><input name="portrait" type="checkbox" value="P" checked> portrait</td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td class="txtBk"><input name="landscape" type="checkbox" value="L" checked> landscape</td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td class="txtBk"><input name="panoramic" type="checkbox" value="N" checked> panoramic</td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td><img src="../images/spacer.gif" width="1" height="6"></td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td><a href="#" class="linkTxtBk">search tips </a></td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td><img src="../images/spacer.gif" width="1" height="6"></td>');
    document.write('</tr>');
    document.write('</table></td>');
    document.write('<td background="../images/img_bdr_04.gif"><img src="../images/spacer.gif" width="1" height="200"></td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td><img src="../images/img_cr_03.gif" width="4" height="4"></td>');
    document.write('<td background="../images/img_bdr_02.gif"><img src="../images/spacer.gif" width="1" height="1"></td>');
    document.write('<td><img src="../images/img_cr_04.gif" width="4" height="4"></td>');
    document.write('</tr>');
    document.write('</table>');
    document.write('</form>');	
}



function footer() {
	document.write('<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">');
  	document.write('<tr>');
    document.write('<td colspan="3"><img src="../images/spacer.gif" width="1" height="10"></td>');
	document.write('</tr>');
	document.write('<tr>');
    document.write('<td width="10"><img src="../images/spacer.gif" width="10" height="8"></td>');
    document.write('<td background="../images/bg_menu_sh.gif"><img src="../images/spacer.gif" width="1" height="18"></td>');
    document.write('<td width="10"><img src="../images/spacer.gif" width="10" height="8"></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td><img src="../images/spacer.gif" width="10" height="8"></td>');
	document.write('<td><img src="../images/spacer.gif" width="20" height="8"><a href="../home/contact.asp" class="linkTxtBk" target="_parent">contact us</a><span class="txtBlLine">|</span><a href="http://www.imagerite.com/studio/html/index.html" class="linkTxtBk" target="_blank">photo assignment</a><span class="txtBlLine">|</span><a href="../home/about.asp"  target="_parent" class="linkTxtBk">about us</a><span class="txtBlLine">|</span><a href="../home/licensing.asp"  target="_parent" class="linkTxtBk">license note</a><span class="txtBlLine">|</span><a href="../home/policy.asp"  target="_parent" class="linkTxtBk">privacy policy</a></td>');
	document.write('<td><img src="../images/spacer.gif" width="10" height="8"></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td><img src="../images/spacer.gif" width="10" height="22"></td>');
	document.write('<td><img src="../images/spacer.gif" width="20" height="8"><span class="txtBk">&copy;1998 - 2007 ImageRite Ltd. All rights reserved.</span></td>');
	document.write('<td><img src="../images/spacer.gif" width="10" height="8"></td>');
	document.write('</tr>');
	document.write('</table>');

}

//temp javascript for pototype
function getURL(link) {
	this.window.location = link;
}

function refreshFrame(status) {
	if(status) {
		parent.window.fr = "130";
	} else {
		parent.window.fr = "30";
	}
	parent.window.reload();
}