
var ClientID;var PopUpDivName;var SelectedMenu;var ThemeImagesFolder;var ServerDateTime;var MainAuctionID='0';var LogObject;function ShowPopup(DivName,FrameName,src,Width,Height){PopUpDivName=DivName;$('#'+PopUpDivName).show();$('#'+FrameName).attr('src',src);if(Width==null)
{Width='500px';};if(Height==null)
{Height='350px';};$('#'+FrameName).attr('width',Width);$('#'+FrameName).attr('height',Height);};function ClosePoup(){$('#'+PopUpDivName).hide();PopUpDivName='';};var currentPopMenuID=null;var mouseOverPopMenu=false;function ShowPopMenu(menuItemID){HidePopMenu(currentPopMenuID);currentPopMenuID=menuItemID;mouseOverPopMenu=true;$("#PopMenu"+menuItemID).show();document.onmousemove=function(){if(mouseOverPopMenu){mouseOverPopMenu=false;return;}
HidePopMenu(currentPopMenuID);};};function HidePopMenu(menuItemID){if(menuItemID){$("#PopMenu"+menuItemID).hide();}};function ConfirmForDelete(Message){return window.confirm(Message);};function ShowDiv(divid){document.getElementById(divid).style.display='inline';};function CloseDiv(divid){document.getElementById(divid).style.display='none';};var currentPopMenuID=null;var mouseOverPopMenu=false;function ShowPopMenu(menuItemID){HidePopMenu(currentPopMenuID);currentPopMenuID=menuItemID;$("#PopMenu"+menuItemID).show();document.onclick=function(){HidePopMenu(currentPopMenuID);};};function HidePopMenu(menuItemID){if(menuItemID){$("#PopMenu"+menuItemID).hide();}};function format_raw_to_price(price){delimiter=".";currency="$";price=new String(price);return currency+price;};function GetDateDiff(DateStr1,DateStr2){var date1str=new Date(DateStr1);var date2str=new Date(DateStr2);var diff=new Date();diff.setTime(Math.abs(date1str.getTime()-date2str.getTime()));var timediff=diff.getTime();var weeks=Math.floor(timediff/(1000*60*60*24*7));timediff-=weeks*(1000*60*60*24*7);var days=Math.floor(timediff/(1000*60*60*24));timediff-=days*(1000*60*60*24);var hours=Math.floor(timediff/(1000*60*60));timediff-=hours*(1000*60*60);var mins=Math.floor(timediff/(1000*60));timediff-=mins*(1000*60);var secs=Math.floor(timediff/1000);timediff-=secs*1000;return hours+":"+mins+":"+secs;};function swapbtnImage(btnID,ImageAddress){$('#'+btnID).attr('src',ImageAddress);};function hidedisplay(div_id){var el=$('#'+div_id);if(el){if(el.css('display')=="none"){el.css('display','');}else{el.css('display','none');}}};function colorConv(color){var rgb=[parseInt(color.substring(0,2),16),parseInt(color.substring(2,4),16),parseInt(color.substring(4,6),16)];return rgb;};function chk_empty(str){if(str==null||str=="")
{return false;}
else
{if(chk_unnormal(str))
{return true;}
else
{return false;}}};function chk_unnormal(str)
{var patten=new RegExp("[<>]","g");var result=str.match(patten);if(result==null)
{return true;}
else
{return false;}};function chk_email(str){var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)
if(str.indexOf(at)==-1){return false;}
if(str.indexOf(at)==-1||str.indexOf(at)==0||str.indexOf(at)==lstr){return false;}
if(str.indexOf(dot)==-1||str.indexOf(dot)==0||str.indexOf(dot)==lstr){return false;}
if(str.indexOf(at,(lat+1))!=-1){return false;}
if(str.substring(lat-1,lat)==dot||str.substring(lat+1,lat+2)==dot){return false;}
if(str.indexOf(dot,(lat+2))==-1){return false;}
if(str.indexOf(" ")!=-1){return false;}
return true;};function ClickBid(auctionid){var SelectedAuction=AllAuctions.get(auctionid);SelectedAuction.Dobid();};function Log(text){if(!LogObject){LogObject=$("<div style='border:1px solid #323232;background-color:#FFFFFA;padding:10px;position:absolute;width:150px;height:500px'>");$("body").prepend(LogObject);}
LogObject.html(LogObject.html()+' '+text);};