
function open_Preview( pic_ID, options )
{
	window.open( "preview.php?pictureID="+pic_ID , 
	             pic_ID, 
	             "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=yes, width=950, height=800").focus()
}

function open_ModelPreview( pic_ID, options )
{
	window.open( "preview_model.php?pictureID="+pic_ID , 
	             pic_ID, 
	             "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=yes, width=950, height=800").focus()
}

function open_URL_in_OpenerWindow(sURL) 
{
	opener.document.location = sURL;
}

function close_Preview()
{
	window.close()
}

function getCookie(c_name, DefaultValue)
{
   if (document.cookie.length>0) {
      c_start=document.cookie.indexOf(c_name + "=")
      if (c_start!=-1) { 
         c_start = c_start + c_name.length+1 
         c_end   = document.cookie.indexOf(";",c_start)
         if (c_end==-1) {
         	c_end=document.cookie.length
         }
         return unescape(document.cookie.substring(c_start,c_end))
      } 
   }
   return DefaultValue
}

function setCookie(c_name,value,expiredays)
{
   var exdate=new Date()
   exdate.setDate(exdate.getDate()+expiredays)
   document.cookie=c_name + "=" + escape(value) + ((expiredays==null) ? "" : ";expires="+exdate)
}


