element was not correctly identified; information pane has been switched OFF");
return;
}
if (!infoShowMsg) {
infoShowDiv.innerHTML = "";
return;
}
if (infoShowW) {
infoShowW += "px";
}
else {
infoShowW = "100%";
}
if (!infoShowH) {
infoShowH = infoShowHeight;
}
infoShowH += "px";
infoShowMsg = infoShowMsg.split("\n");
infoShowMsg = infoShowMsg.join("
");
infoShowStr = "
0) {
infoShowStr += ";height:" + infoShowH;
}
infoShowStr += ";padding:8px";
infoShowStr += ";color:#000000";
infoShowStr += ";background-color:#FFFFFF";
infoShowStr += ";font-size:11pt";
infoShowStr += "\"";
infoShowStr += ">";
infoShowStr += "";
infoShowStr += infoShowMsg;
infoShowStr += "";
infoShowStr += "
";
infoShowDiv.innerHTML = infoShowStr;
}
infoShowHeight = 100;
function infoToggle ( ) {
if (confirm('Visit ICE web site?')) {
return true;
}
if (infoToggleOn) {
if (confirm('Switch information pane OFF?')) {
infoToggleOn = false;
}
return false;
}
if (confirm('Switch information pane ON?')) {
infoToggleOn = true;
}
return false;
}
infoToggleOn = true;
// LAYER HANDLING
function layerFromEvent (layerFromEventE) {
if (layerFromEventE.target) {
layerFromEventL = layerFromEventE.target;
}
else if (layerFromEventE.srcElement) {
layerFromEventL = layerFromEventE.srcElement;
}
else {
return false;
}
// Safari bug
if (layerFromEventE.nodeType==3) {
layerFromEventL = layerFromEventE.parentNode;
}
return layerFromEventL;
}
function layerHd (layerHdElmt,layerHdSrc,layerHdTxtSh) {
window.layerList[layerHdElmt] = 0;
try {
layerHdElmt = document.getElementById (layerHdElmt);
layerHdElmt.style.visibility = 'hidden';
layerHdSrc.innerHTML = layerHdTxtSh;
}
catch (e) {
alert ("layerHd(): "+e);
return false;
}
return true;
}
function layerSquish (layerSquishObjId,layerSquishYes) {
try {
layerSquishObj = document.getElementById (layerSquishObjId);
}
catch (e) {
return false;
}
if (layerSquishYes=="_TOGGLE") {
if (layerSquishObj.style.height=="0") {
layerSquishYes = false;
}
else {
layerSquishYes = true;
}
}
if (layerSquishYes) {
layerSquishVal = "0";
}
else {
layerSquishVal = "auto";
}
try {
layerSquishObj.style.height = layerSquishVal;
}
catch (e) {
return false;
}
return true;
}
function layerSh (layerShElmt,layerShSrc,layerShTxtHd) {
window.layerList[layerShElmt] = 1;
try {
layerShElmt = document.getElementById (layerShElmt);
layerShElmt.style.visibility = 'visible';
layerShSrc.innerHTML = layerShTxtHd;
}
catch (e) {
alert ("layerSh(): "+e);
return false;
}
return true;
}
function layerSw (layerSwElmt,layerSwSrc,layerSwTxtSh,layerSwTxtHd) {
if (!window.layerList) {
layerList = new Array ();
}
if (window.layerList[layerSwElmt]) {
// On, so hide
layerHd (layerSwElmt,layerSwSrc,layerSwTxtSh);
return;
}
// On, so hide
layerSh (layerSwElmt,layerSwSrc,layerSwTxtHd);
}
function layerVisible (layerVisibleObjId,layerVisibleYes) {
try {
layerVisibleObj = document.getElementById (layerVisibleObjId);
}
catch (e) {
return false;
}
if (layerVisibleYes=="_TOGGLE") {
if (layerVisibleObj.style.visibility=="visible") {
layerVisibleYes = false;
}
else {
layerVisibleYes = true;
}
}
if (layerVisibleYes) {
layerVisibleVal = "visible";
}
else {
layerVisibleVal = "hidden";
}
try {
layerVisibleObj.style.visibility = layerVisibleVal;
}
catch (e) {
return false;
}
return true;
}
// LOGON
function logonRequest (logonRequestDomain,logonRequestPath,logonRequestAlert) {
logonRequestCookie = "lreq=1;path=" + logonRequestPath + ";";
if (logonRequestDomain.length>0) {
logonRequestCookie += "domain=" + logonRequestDomain + ";";
}
document.cookie = logonRequestCookie;
return true;
}
// MENU OPTIONS
function menuOptionProcess (menuOptionProcessObj) {
try {
menuOptionProcessVal = menuOptionProcessObj.options[menuOptionProcessObj.selectedIndex].value;
}
catch (e) {
return false;
}
if (!menuOptionProcessVal) {
return false;
}
if (!menuOptionTargetWin) {
menuOptionTargetWin = window.self;
}
menuOptionProcessVal = menuOptionProcessVal.split(",");
if (menuOptionProcessVal[0]=="js") {
menuOptionProcessVal.shift();
if (menuOptionProcessVal.length==0) {
return false;
}
if (menuOptionProcessVal[0]=="favourites" && menuOptionProcessVal.length>1) {
if (menuOptionProcessVal[1]=="list") {
menuOptionProcessUrl = "https://www.makeviolins.com/?A=favourite_list";
}
else {
menuOptionProcessUrl = menuOptionProcessVal[1];
}
menuOptionTargetWin.location.href = menuOptionProcessUrl;
}
return false;
}
else {
if (menuOptionProcessVal[0]=="filter" && menuOptionProcessVal.length>1) {
menuOptionCurrentIdx = menuOptionProcessObj.selectedIndex;
}
}
return true;
}
menuOptionCurrentIdx = 0;
menuOptionTargetWin = false;
// NO RIGHT CLICK
function noRightClick ( ) {
if (document.layers) {
document.captureEvents (Event.MOUSEDOWN);
document.onmousedown = noRightClickNS4;
}
else if (document.all && !document.getElementById) {
document.onmousedown = noRightClickIE4;
}
document.oncontextmenu = new Function ("return false");
}
function noRightClickIE4 ( ) {
if (event.button==2) {
return false;
}
}
function noRightClickNS4 (e) {
if (document.layers || document.getElementById && !document.all) {
if (e.which==2 || e.which==3){
return false;
}
}
}
// NUMBERS
function numberExtract (numberExtractValue) {
numberExtractValue = parseInt (numberExtractValue);
if (numberExtractValue==null || isNaN(numberExtractValue)) {
return 0;
}
return numberExtractValue;
}
function numberDP (numberDPin,numberDPs) {
numberDPs = parseInt(numberDPs);
numberDPout = new Array ();
numberDPout[0] = Math.floor (numberDPin);
numberDPout[1] = numberDPin - numberDPout[0];
numberDPout[1] *= Math.pow (10,numberDPs);
numberDPout[1] = String (Math.floor(numberDPout[1]+0.5));
while (numberDPout[1].length
15) {
numberDecToHexIn >>= 4;
numberDecToHexOut = numberDecToHexDef.substr(numberDecToHexIn&15,1) + numberDecToHexOut;
}
return numberDecToHexOut;
}
// BODY EVENTS
function bodyOnloadIni ( ) {
}
function bodyOnunloadIni ( ) {
}
// OPACITY
function opacityChange (opacityChangeObj,opacityChangeValue) {
opacityChangeObj.style.opacity = opacityChangeValue;
opacityChangeOp = numberExtract (100*opacityChangeValue);
opacityChangeObj.style.filter = "alpha(opacity="+opacityChangeOp+")";
}
// WINDOW OPENERS
function openAction (openActionUrl,openActionParams) {
try {
if (!window.actionWin || window.actionWin.closed) {
actionWin = window.open("","actionWindow",openActionParams);
if (actionWin.opener==null) { actionWin.opener = self }
}
actionWin.focus();
if (openActionUrl) {
try {
actionWin.location.href = openActionUrl;
}
catch (e) {
alert ("Error occured while relocating HTML window 'actionWindow'");
return false;
}
}
}
catch (e) {
alert ("Error occured while opening HTML window 'actionWindow'");
return false;
}
return true;
}
function openAffiliatelink (openAffiliatelinkHandle,openAffiliatelinkDontFocus) {
try {
if (!window.affiliatelinkWin || window.affiliatelinkWin.closed) {
affiliatelinkWin = window.open("","affiliatelinkWindow");
if (affiliatelinkWin.opener==null) { affiliatelinkWin.opener = self }
}
openAffiliatelinkUrl = "/?A=affiliate_link&affiliatelink=" + openAffiliatelinkHandle;
affiliatelinkWin.location.href = openAffiliatelinkUrl;
if (openAffiliatelinkDontFocus) { return true }
affiliatelinkWin.focus();
}
catch (e) {
alert ("Error occured while opening HTML window 'affiliatelinkWindow'");
return false;
}
return true;
}
function openAlert (openAlertMessage,openAlertDontClear) {
try {
if (openAlertDontClear==null) {
openAlertMessageClear = true;
}
else {
openAlertMessageClear = false;
}
openAlertMessageBuffer = openAlertMessage;
if (!window.alertWin || window.alertWin.closed) {
openAlertWriteTarget = null;
alertWin = window.open("https://www.makeviolins.com/?A=alert","alertWindow","width=350,height=250,toolbar=0,directories=0,status=0,scrollbars=1,resizable=0,menubar=0,location=0");
openAlertDefeat (openAlertMessage);
if (alertWin.opener==null) { alertWin.opener = self }
}
else {
alertWin.alertWrite();
}
alertWin.focus();
}
catch (e) {
alert ("Error occured while opening HTML window 'alertWindow'");
return false;
}
return true;
}
openAlertMessageClear = true;
openAlertMessageBuffer = "";
function openAlertDefeat (openAlertDefeatCheck) {
if (openAlertDefeatCheck==null) {
// Alert window calls this function with openAlertDefeatCheck=null
debugAlert ("Clearing openAlertDefeatTimeout");
clearTimeout (openAlertDefeatTimeout);
openAlertDefeatTimeout = false;
openAlertDefeatStrike = 0;
// alert ("Alert window has responded");
return true;
}
if (openAlertDefeatStrike>openAlertDefeatStrikeOut) {
// alert ("openAlert() was defeated");
alert (openAlertMessageBuffer);
return true;
}
openAlertDefeatStrike++;
// alert ("Alert NOT responded - strike "+openAlertDefeatStrike);
debugAlert ("openAlertDefeat(1)");
openAlertDefeatTimeout = setTimeout ("openAlertDefeat(1)",openAlertDefeatTryTime);
}
openAlertDefeatTryTime = 100; // ms
openAlertDefeatStrikeOut = 40; // num of tries
openAlertDefeatStrike = 0; // current tries
openAlertDefeatTimeout = false;
function openConference (openConferenceX,openConferenceY) {
if (!openConferenceX) {
openConferenceX = 980;
}
if (!openConferenceY) {
openConferenceY = 570;
}
if (!window.conferenceWin || window.conferenceWin.closed) {
conferenceWin = window.open("","conferenceWindow","width="+openConferenceX+",height="+openConferenceY+",toolbar=0,directories=0,status=0,scrollbars=1,resizable=1,menubar=0,location=0,screenX=10,screenY=10,left=10,top=10");
if (conferenceWin.opener==null) { conferenceWin.opener = self }
return true;
}
conferenceWin.focus();
try {
tmp = conferenceWin.conferenceUpdateUrl;
}
catch (e) {
return true;
}
if (!tmp) {
return true;
}
return false;
}
function openColorPicker ( ) {
if (!window.colorPickerTarget) {
alert ("Target form element for the colour picker was not selected");
return false;
}
if (!window.colorPickerWin || window.colorPickerWin.closed) {
try {
colorPickerWin = window.open("./?A=colorpicker&color="+escape(colorPickerTarget.value),"colorPickerWindow","width=460,height=460,scrollbars=1,resizable=1,screenX=10,screenY=10,left=10,top=10");
if (colorPickerWin.opener==null) { colorPickerWin.opener = self }
}
catch (e) {
alert ("Error occured while opening HTML window 'colorPickerWindow'");
return false;
}
}
colorPickerWin.focus();
return true;
}
function openConferenceFile ( ) {
try {
if (!window.conferenceFileWin || window.conferenceFileWin.closed) {
conferenceFileWin = window.open("","conferenceFileWindow","toolbar=0,directories=0,status=0,scrollbars=1,resizable=1,menubar=1,location=0,width=400,height=250,screenX=10,screenY=10,left=10,top=10");
if (conferenceFileWin.opener==null) { conferenceFileWin.opener = self }
}
conferenceFileWin.focus();
}
catch (e) {
alert ("Error occured while opening HTML window 'conferenceFileWindow'");
return false;
}
return true;
}
function openImage (openImageUrl,openImageWidth,openImageHeight,openImageTitle) {
openImageWinWidth = openImageWidth + 30;
openImageWinHeight = openImageHeight + 30;
openImageUrlBuffer = openImageUrl;
openImageWidthBuffer = openImageWidth;
openImageHeightBuffer = openImageHeight;
try {
if (openImageTitle!=null) {
openImageTitleBuffer = openImageTitle;
}
if (window.imageWin && !window.imageWin.closed) {
imageWin.resizeTo (openImageWinWidth+12,openImageWinHeight+30);
imageWin.imageWrite();
}
else {
openImageWriteTarget = null;
imageWin = window.open ("https://www.makeviolins.com/?A=image","imageWindow","width="+openImageWinWidth+",height="+openImageWinHeight+",toolbar=0,directories=0,status=0,scrollbars=0,resizable=1,menubar=0,location=0,screenX=10,screenY=10,left=10,top=10");
if (imageWin.opener==null) { imageWin.opener = self }
}
imageWin.focus();
}
catch (e) {
alert ("Error occured while opening HTML window 'imageWindow'");
return false;
}
return true;
}
openImageUrlBuffer = "";
openImageWidthBuffer = 0;
openImageHeightBuffer = 0;
openImageTitleBuffer = "Untitled";
function openLogon ( ) {
try {
if (!window.logonWin || window.logonWin.closed) {
logonWin = window.open("","logonWindow","toolbar=0,directories=0,status=0,scrollbars=1,resizable=1,menubar=1,location=0,width=400,height=250,screenX=10,screenY=10,left=10,top=10");
if (logonWin.opener==null) { logonWin.opener = self }
}
logonWin.focus();
}
catch (e) {
alert ("Error occured while opening HTML window 'logonWindow'");
return false;
}
return true;
}
function openMain (openMainUrl) {
try {
if (window.opener && !window.opener.closed) {
try {
if (openMainUrl) {
window.opener.location.href = openMainUrl;
}
window.opener.focus();
return true;
}
catch (e) {
// Permission denied so use a new window
}
}
if (openMainUrl=="") {
openMainUrl = "./?A=welcome";
}
mainWin = window.open(openMainUrl,"mainWindow","location=1,toolbar=1,menubar=1,scrollbars=1,resizable=1,status=1,width=800,height=600,screenX=0,screenY=0,left=0,top=0");
}
catch (e) {
alert ("Error occured while opening HTML window 'mainWindow'");
return false;
}
return true;
}
function openPayment (openPaymentW,openPaymentH,openPaymentQuiet) {
try {
if (!window.paymentWin || window.paymentWin.closed) {
paymentWin = window.open("","paymentWindow","toolbar=0,directories=0,status=0,scrollbars=1,resizable=1,menubar=1,location=0,screenX=10,screenY=10,left=10,top=10,width="+openPaymentW+",height="+openPaymentH);
if (paymentWin.opener==null) { paymentWin.opener = self }
}
paymentWin.focus();
}
catch (e) {
if (!openPaymentQuiet) {
alert ("Error occured while opening HTML window 'paymentWindow'");
}
return false;
}
return true;
}
function openPicture (openPictureW,openPictureH) {
openPictureW = (1*openPictureW) + 50;
openPictureH = (1*openPictureH) + 50;
try {
if (!window.pictureWin || window.pictureWin.closed) {
pictureWin = window.open("","pictureWindow","toolbar=0,directories=0,status=0,scrollbars=0,resizable=1,menubar=0,location=0,screenX=10,screenY=10,left=10,top=10,width="+openPictureW+",height="+openPictureH);
if (pictureWin.opener==null) { pictureWin.opener = self }
}
else {
try { pictureWin.resizeTo (openPictureW,openPictureH) }
catch (e) { }
}
pictureWin.focus();
}
catch (e) {
// alert ("Error occured while opening HTML window 'pictureWindow'");
return false;
}
return true;
}
function openPrint ( ) {
try {
if (!window.printWin || window.printWin.closed) {
printWin = window.open("","printWindow","toolbar=0,directories=0,status=0,scrollbars=1,resizable=1,menubar=1,location=0,screenX=10,screenY=10,left=10,top=10,width=700,height=600");
if (printWin.opener==null) { printWin.opener = self }
}
printWin.focus();
}
catch (e) {
alert ("Error occured while opening HTML window 'printWindow'");
return false;
}
return true;
}
// POST REQUEST COOKIE
function postRequest (postRequestDomain,postRequestPath,postRequestAlert) {
tmp = document.cookie.split("preq=");
if (tmp[1]) {
tmp = tmp[1].split(";");
postRequestCookie = 1 * tmp[0];
}
else {
postRequestCookie = 0;
}
if (postRequestCookie) {
// Post request cookie will be unset by the server
if (postRequestAlert) {
alert ("Form is currently being posted and returned\nIf this message persists, close down all browser windows and try again");
}
return 0;
}
postRequestCookie = "preq=1;";
postRequestCookie += "path=" + postRequestPath + ";";
if (postRequestDomain.length>0) {
postRequestCookie += "domain=" + postRequestDomain + ";";
}
document.cookie = postRequestCookie;
try {
window.top.document.getElementById("iceIconImg").src = iceIconImgSrc;
}
catch (e) {
}
return 1;
}
iceIconImgSrc = "https://www.makeviolins.com/?A=media&file=%252Fimage%252Ficon_header_posting.gif";
function postRequestImgChange (postRequestImgChangeSrc) {
try {
window.top.document.getElementById("iceIconImg").src = postRequestImgChangeSrc;
}
catch (e) {
}
}
postRequestImgChangeSrc = "https://www.makeviolins.com/?A=media&file=%252Fimage%252Ficon_header.gif";
// PRINT READABLE
function printReadable (printReadableVar,printReadableVarRtn,printReadableFilter) {
printReadableOut = "";
try {
printReadableFilterLen = printReadableFilter.length;
for (printReadableProperty in printReadableVar) {
tmp = false;
if (printReadableFilterLen) {
tmp2 = printReadableProperty.substr (0,printReadableFilterLen);
if (tmp2==printReadableFilter) {
tmp = true;
}
}
else {
tmp = true;
}
if (tmp) {
printReadableOut += printReadableProperty+"\n";
}
}
}
catch (e) {
try {
printReadableOut += printReadableVar.value+"\n";
}
catch (e) {
printReadableOut += printReadableVar;
}
}
if (printReadableVarRtn) {
return printReadableOut;
}
alert (printReadableOut);
}
// MORE DATE AND TIME
function reportTimeLoc (reportTimeLocRepeat) {
// Report client local time via session cookie "tloc"
reportTimeLocNow = new Date();
reportTimeLocString = reportTimeLocNow.getYear();
reportTimeLocString += ":";
temp = reportTimeLocNow.getMonth() + 1;
reportTimeLocString += temp;
reportTimeLocString += ":";
reportTimeLocString += reportTimeLocNow.getDate();
reportTimeLocString += ":";
reportTimeLocString += reportTimeLocNow.getHours();
reportTimeLocString += ":";
reportTimeLocString += reportTimeLocNow.getMinutes();
reportTimeLocCookie = "tloc="+reportTimeLocString+";"
reportTimeLocCookie += "path=/;domain=www.makeviolins.com;"
document.cookie = reportTimeLocCookie;
if (reportTimeLocRepeat!=null) {
if (reportTimeLocRepeat<1) {
reportTimeLocRepeat = 1;
}
debugAlert ("reportTimeLoc("+reportTimeLocRepeat+")");
setTimeout ("reportTimeLoc("+reportTimeLocRepeat+")",1000*reportTimeLocRepeat);
}
}
reportTimeLoc (60);
// CLIENT SNIFFING
function sniffBrowser ( ) {
if (sniffPfm=="lnx") { return }
if (sniffApn!="n/k") { return }
sniffThisApp = navigator.appName.toLowerCase();
if (sniffThisApp.indexOf('netscape')!=-1) {
sniffApn = "nsc";
if (sniffApv>=5) {
sniffThisAgent = navigator.userAgent.toLowerCase();
sniffPointer = sniffThisAgent.indexOf('netscape6/');
sniffVerAsString = sniffThisAgent.substr(sniffPointer+10,3);
sniffApv = parseFloat(sniffVerAsString);
}
}
else {
sniffApv = 0;
}
sniffResult = "binf="+sniffPfm+","+sniffApn+","+sniffApv+";";
document.cookie = sniffResult+"path=/;domain=www.makeviolins.com;";
}
sniffPfm = "";
sniffApn = "";
sniffApv = "";
sniffBrowser();
// FORM MANAGEMENT
function stringTrim (stringTrimStr) {
while (stringTrimStr.substring(0,1)==" ") {
stringTrimStr = stringTrimStr.substring(1,stringTrimStr.length);
}
while (stringTrimStr.substring(stringTrimStr.length-1,stringTrimStr.length)==" ") {
stringTrimStr = stringTrimStr.substring(0,stringTrimStr.length-1);
}
return stringTrimStr;
}
function textareaRestrict (textareaRestrictFld,textareaRestrictCnt,textareaRestrictMax) {
if (textareaRestrictFld.value.length>textareaRestrictMax) {
textareaRestrictFld.value = textareaRestrictFld.value.substring (0,textareaRestrictMax);
}
textareaRestrictCnt.value = textareaRestrictMax - textareaRestrictFld.value.length;
}
// WINDOW SCROLLING
function windowScrollBy (windowScrollDx,windowScrollDy) {
windowScrollx0 = 1 * window.pageXOffset;
if (windowScrollx0) {
windowScrolly0 = 1 * window.pageYOffset;
}
else {
windowScrollx0 = 1 * document.body.scrollLeft;
windowScrolly0 = 1 * document.body.scrollTop;
}
windowScrollx1 = windowScrollx0 + (1*windowScrollDx);
windowScrolly1 = windowScrolly0 + (1*windowScrollDy);
try { window.scrollTo (windowScrollx1,windowScrolly1); }
catch (e) { }
}